Functions, Part II / 6.Parameters and Arguments: Oops, try again. It looks like nothing was printed! Did you remember to call your function? (Check the Hint if you need help.)


#1


https://www.codecademy.com/courses/web-beginner-en-RcIEe/0/6?curriculum_id=5124ef4c78d510dd89003eb8#

It returns:

Oops, try again. It looks like nothing was printed! Did you remember to call your function? (Check the Hint if you need help.)


<html>
	<head>
		<title></title>
	</head>
	<body>
    <?php
        function greetings ($name)
        {
        echo "Greetings, " .$name. "!";
        }
        greetings('Platinum');
        ?>
      
      
    </body>
</html>

I tried also:

<html>
	<head>
		<title></title>
	</head>
	<body>
    <?php
        n$ = 'Platinum';
        function greetings ($name)
        {
        echo "Greetings, " . $name . "!";
        }
        greetings(n$);
        ?>
      
      
    </body>
</html>

and

<html>
	<head>
		<title></title>
	</head>
	<body>
    <?php
        function greetings ($name)
        {
        echo "Greetings, " . $name . "!";
        }
        n$ = "Platinum";
        greetings(n$);
        ?>
      
      
    </body>
</html>

I tried also to restart my browser, tried to put my code in another browser, but it didn't work. Please help me solve this problem!


#2

The first one should work...

The others shouldn't.. because

should be $n = 'Platinum';


#3


It was after refreshing the page and re-entering the code


#4

May be, it's the browser... especially if you are using Chrome, zoom out to 80% with Ctrl - and try again.


#5

I tried disable all chrome extensions, zoom out to 80% and re-entered all the code. Don't know what the reason was but it worked!
Thanks for your prompt help!


#6

You're welcome dude.


#7

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