PHP functions, part II; what's wrong with my code?


I'm on the last exercise and I'm stuck. It seems the interpreter is not reading my function correctly. Here the link to the exercise:

The error message it's returning is this:
Parse error: syntax error, unexpected '<' on line 9 >

When I click on "Save and Submit", there's a message that basically says I haven't properly called my function even though I have. Nothing I've tried has worked so far. Here's my code:

        function aboutMe($name, $age)
        {echo "Hello!  My name is" .$name. " and I am" .$age. "years old."};
        aboutMe("Michael", 38);



Place a semi-colon at the end of the echo statement so you now have.

        {echo "Hello!  My name is" .$name. " and I am" .$age. "years old.";};

I hope this helps! :wink:


Thanks bayoishola20. That worked.


You're welcome.

Have fun coding! :smile:


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