-2

I have this problem when I did some php and try to call this function again can anybody help?

PHP Parse error: syntax error, unexpected T_STRING on line 12

Code:

 <?php
function greetings($name) {
    echo "Greetings, " . $name . "!";
}

$n = "Magnus"
greetings($n);
?>
halfer
  • 19,824
  • 17
  • 99
  • 186
Magnus Jensen
  • 11
  • 1
  • 2

1 Answers1

3

You forgot to add ";" in code

$n = "Magnus";  // use a ;
Unni Babu
  • 1,839
  • 12
  • 16