What is the error? (Math function 2)


#1


Hi,
When I execute this code, the error occurred as below.
What's wrong with my code?


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


Oops, try again.
The random output you printed from your name should be just one character.


    $name="Mohammad";
    $select=rand(0,strlen($name)-1);
    echo $select.'<br />';;
    print substr($name,$select,1);


#2

The random output you printed from your name should be just one character.
so dont need to print

echo $select.'<br />'; // remove it or comment it

#3

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