It doesn't accept first code's result as a number


#1

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

Your first strpos() call should output a number


<html>
 
    <?php
    // Print out the position of a letter that is in
    // your own name
    print strpos("kacso", "so");
    ?>
    <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("tejfol", "kv") === false) {
    print "omg";
    }
    ?></p></p>
 
</html>


#2

Hi this part add an open tag <p> and close it

   <p> <!-- add this open p tag-->
    <?php
    // Print out the position of a letter that is in
    // your own name
    print strpos("kacso", "so");
    ?>
    <p> <!-- change this tag to a closing tag </p> -->

REad the comment


#3

omg. Thanks. I don't know why paragraph is so important for the lesson but it works.


#4

I think it's because the lesson want you to use thr paragraph format
a paragraph

it's just the one we use to write the post


the code is

<p>it's just the one we use to write the post</p>

or the h1 tag

<h1>I'm the h1 tag<h1>

will look like

I'm the h1 tag


#5

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