3. String Functions Part II


https://www.codecademy.com/courses/web-beginner-en-7I7Xm/0/3?curriculum_id=5124ef4c78d510dd89003eb8 <-- Link to the exercise.

Oops, try again. Your first strpos() call should output a number. <-- My Error.
Question: Can anybody tell me what i do wrong? :slight_smile:

        // Print out the position of a letter that is in
        // your own name
        $lol = strpos("Mike", "k");
        $lol2 = array(1, 2);
        // Check for a false value of a letter that is not
        // in your own name and print out an error message
        if(strpos("Mike", "y") == false) {
            print "Sorry, no 'y' in 'Mike'".$lol2[0];    
        } else {
            print "The letter is available".$lol2[1];  


echo strpos("Mike",'k');