Dumb question of the day!
Posted: Mon Feb 24, 2003 2:20 pm
Can anyone tell me why I get a PARSE ERROR when trying to assign a value to a variable? These only happen where there is a FUNCTION defined.
<?php
function david() {
$a = "Hello";
}
?>
Gives me a parse error, regardless of the function name I give or the variable name I assign.
Parse error: parse error in /Library/WebServer/Documents/phpfunction.php on line 1
Whenever I paste code snippets from sites I get errors as well when there are FUNCTIONS present?
It's driving me nuts. Feel free to point out my stupid error.
Running on Mac OSX Server.
<?php
function david() {
$a = "Hello";
}
?>
Gives me a parse error, regardless of the function name I give or the variable name I assign.
Parse error: parse error in /Library/WebServer/Documents/phpfunction.php on line 1
Whenever I paste code snippets from sites I get errors as well when there are FUNCTIONS present?
It's driving me nuts. Feel free to point out my stupid error.
Running on Mac OSX Server.