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

Functions, Part I Forum

View Course » View Exercise

142 points
2e26e0f10d430a999df978261e8075b8?s=140&d=retro
Submitted by
Justin Weissert
about 3 years ago

I need help!!!!!

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


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


0 votes

permalink

put print before strpos("david", "a"); and delete print "1" // 0

520 points
5461859b631fe9449d000ddc_826809439
Submitted by
Mathew Beck
about 3 years ago