Page 1 of 1

Parse error with a simple function

Posted: Tue Sep 19, 2006 7:54 am
by theOlster
Hi, I'm very new to php programming and am having a few problems creating functions.
Example code:
<?php
funtion doHello($Name = "Paul") {
return "Hello $Name\n";
}
?>
results in:
Parse error: syntax error, unexpected T_STRING in /home/oliver/public_html/thesubstitutes/diary/php.php on line 2
But I can't see anthing I've missed - any ideas?

PHP version 5.1.4 on custom Linux install (Fedora 5)

Posted: Tue Sep 19, 2006 8:11 am
by feyd
function.

Posted: Tue Sep 19, 2006 8:13 am
by happy_tapper
Hi
On line 2 of your code you are missing a 'C' in FUNCTION.
It could possibly be just a spelling mistake that is throwing up your error.

Posted: Tue Sep 19, 2006 8:15 am
by theOlster
Ok... now I just feel dmub(?sp)!

Many thanks!