Oops, try again. Your first strpos() call should output a number


#1

On PHP, in the strpos section, I have NO idea what I'm supposed to put there. It says it expects a number but no matter where or how I put the number in, I get the same error message.
Here's what I have: strpos("Lon", "L");
I put the number afterward without anything in between, with == and with // which were all taken from different places. // from the area to the left of the problem, == from W3C and without anything else just because I tried the other two without any luck.
The error message is: Oops, try again. Your first strpos() call should output a number.
Someone PLEASE help???


#2

Please post your code so we can test it. Thank you.


#3

I have the same issue.


<?php
// Print out the position of a letter that is in
// your own name

strpos("emily", "e");
?>
</p>
<p>
<?php
// Check for a false value of a letter that is not
// in your own name and print out an error message
if (strpos("emily","h") === false) {

print "Sorry, no 'h' in 'emily'";
}

?>
</p>


this is everything from line 1-20.


#4

Do you mean,

print strpos("emily", "e");

?


#5



<?php
// Print out the position of a letter that is in
// your own name
strpos("Lon", "L", 0);
?>



<?php
// Check for a false value of a letter that is not
// in your own name and print out an error message

?>
</p>


#6

Like above, it should read,

    print strpos("Lon", "L");

The second part can be fashioned after what is posted above:


#7

I have no idea what you did, but it works. Thank you !


#8

just for future reference you should indicate that we needed to print in the first part. I was going nuts for one word, that I just wasn't sure where to put it. I feel if you just say print in the instructions it would save a lot of confusion.


#9

Remember to watch for instructions in the code comments.