I do not see my mistake in my code even if it is not running


#1

https://www.codecademy.com/courses/web-beginner-en-7I7Xm/0/3?curriculum_id=5124ef4c78d510dd89003eb8#


I do not see my mistake in my code even if it is not running. I the plattform shows that my " first strpos() call should output a number"


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

https://www.codecademy.com/courses/web-beginner-en-7I7Xm/0/3?curriculum_id=5124ef4c78d510dd89003eb8#


#2

strpos() simply returns the index number, but you need to output it using print


#3

Do I need to do write like " print.strpos() "?


#4

It should be the same way as you used print on the lower line.


#5

Thank you! It finally worked


#6

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