<<< Previous question <<< Question ID#0742.md >>> Next question >>>
What is the output of the following code?
$str = 'abcdef';
if (strpos($str, 'a')) {
echo "Found the letter 'a'";
} else {
echo "Could not find the letter 'a'";
}
- A) Could not find the letter 'a'
- B) Found the letter 'a'
- C) "Could not find the letter 'a'"
- D) "Found the letter 'a'"
Answer
Answer: A