This forum is now read-only. Please use our new forums! Go to forums
PLZ HELP!!!
I dont see the error in my code i pressend the submit button 2000 times nothink changes it keep writing Oops, try again! Did you create a function called greetings using the function greetings() syntax? Check the Hint if you need help!
Answer 519e7c10820523f28400095d
function PHP.
<?php
$name= "andres";
function greetings ($name){
echo "Greetings," . $name. "!";
}
greetings($name);
?>
Answer 515f8f10fe3fec54c8000b5d
Your code should look like this:
<?php
function greetings ($name) {
echo "Greetings, " . $name . "!";
}
greetings("Tom");
?>
Your setting your parameter when your calling your greetings function.
2 comments
Wrong! “=” not need after “function”
yeah it worked for me.. but instead of function = greetings ($name) you have to remove the = sign and just function greetings ($name).. thats how it worked for me I just copied his code and didn’t catch the error with the = sign
Answer 515fcaad5f8fb34c86001694
When the check is fixed? I click “submit” every day again and again and it’s shows me “Oops, try again! It looks like nothing was printed! Did you remember to call your function? (Check the Hint if you need help.)”! But my code is right, i checked it on local web-sever:
<?php
function greetings ($name) {
echo "Greetings, " . $name . "!";
}
greetings("Ilya");
?>
Answer 516129015b08ed3e720034e9
I added parentheses around the output line. I also added a line between the function definition and the call.
Don’t know which fix, if any, made the difference, but they didn’t seem to hurt, and the code ran.
<?php
function greetings ($name) {
echo ("Greetings, " . $name . "!");
}
greetings ("Gary");
?>
Answer 540c70d59c4e9d61e4008d78
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
1 comments
No argument passed to the function, like this greetings(“Your Name”);