This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by James McLaren
over 10 years

This is just plain wrong

Here’s the code:

<html>
<head>
    <title></title>
</head>
<body>
<?php 
function displayName() {
    echo "James";
}
displayName();
?>
</body>
</html>

And the error message is “Oops, try again! It looks like your function doesn’t echo or print anything! “ - in spite of the fact that I can see my name echoed to screen.

Answer 51e13cbe631fe94a8d00369f

1 vote

Permalink

your code is ok.

what I did is just copy the exercise 3 code (complete), erased the code in exercise 4 and paste the other one, then added the line to call the function.

the only diference is that the other one has the comments and the paragraph tags, and passed.

weird, but worked.

points
Submitted by nachete
over 10 years

2 comments

Jacob Tooman over 10 years

I did the same thing… really weird. Thank you for the help. It worked!

Rich Girou over 10 years

Just copy code reset and paste it back on the ide.

Answer 5511160bd3292fd3cb001943

0 votes

Permalink

You code is absolutely right. The problem something is with the browser. Just refresh the page and try to summited again. That’s it.

points
Submitted by mejiaadonay
about 9 years

Answer 523d003480ff333625001014

-1 votes

Permalink

Oops,Your code is right! Maybe you need press F5.

points
Submitted by 胡小易
over 10 years