String Functions II - Still throwing " Oops, try again. Your first strpos() call should output a number."


I've tried every [SOLVED] I could find on these boards and must be missing something.

Here's my code:

    // Print out the position of a letter that is in
    // your own name
    $name = strpos("benjamin", "j");    
        print $name;
    // Check for a false value of a letter that is not
    // in your own name and print out an error message
    if (strpos("benjamin" "z") === false) {
        print "Sorry, no 'z' in 'benjamin'";

Can anyone see an error with my code? Please help!

Thanks in advance for the assistance :slightly_smiling:



I guess there's a comma between "benjamin" and "z". You should also try refreshing your webpage because the code editor in php course is really buggy.


Perfect! It worked. Thanks for the solution :slightly_smiling: )