Functions part 1 3/8 error "You should print out a useful error message for the failed strpos() call."


#1

I have tried this so many times and i cant seem to let me go.
CODE:


<?php
print strpos("nick", "c"); //0
print strpos("nick", "p"); //false
?>
<?php
// Check for a false value of a letter that is not
// in your own name and print out an error message
if(strpos("nick", "p") === false) {
print "Sorry there is no 'p' in 'nick'";
}
?>



and now the error message i keep getting.
Oops, try again. You should print out a useful error message for the failed strpos() call.

#2

Please post a link to this exercises. Thank you.


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.