This forum is now read-only. Please use our new forums at

Functions, Part I Forum

View Course

47 points
Submitted by
over 2 years ago

Why does the strpos not work?

// Print out the position of a letter that is in
// your own name
strpos ("michael", "i");

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

Hi above is my code.
The second part of the question works but the first part i.e. strpos does not
Please help

0 votes


you need to print strpos

758 points
Submitted by
over 2 years ago


3b26db250f2180fa7e529b11bbd7579d?s=140&d=retro michaelmamah over 2 years ago

Thanks a lot doffylaw :)

518d4c48b047b9d2760017bb_484778082 Lmar over 2 years ago

How did you get it to work? I'm having the same problem

2c0abd8c404a4dfc6fbda5ebf268e3e6?s=140&d=retro doffylaw over 2 years ago

print strpos("name", "a");