I have a problem with this exercise below, someone can help me to solve it?


#1

I got the "Oops, try again. Your first strpos() call should output a number" message



<?php
// Print out the position of a letter that is in
// your own name
strpos ("joao", "j"); //0
strpos ("joao", "a"); //2
strpos ("joao", "oao"); //3
strpos ("joao", "uty");//false
// Check for a false value of a letter that is not
// in your own name and print out an error message
if (strpos("joao", "u") == false) {
print "Sorry, but no 'u' in 'joao'";
}
?>



#2

On this block, you need to add the word echo before your strpos function.

Heres the whole code for your reference and better understanding.

<html>
        <p>
        <?php
        // Print out the position of a letter that is in
        // your own name
            echo strpos ("joao", "j"); //0
            echo strpos ("joao", "a"); //2
            echo strpos ("joao", "oao"); //3
            echo strpos ("joao", "uty");//false
        ?>
        </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("joao", "u") == false) {
            print "Sorry, but no 'u' in 'joao'";
                }
        ?>
        </p>

    </html>