Forum Moderators: coopster

Message Too Old, No Replies

PHP function does not work, PLEASE HELP!

         

haryanto

10:56 pm on Mar 11, 2004 (gmt 0)

10+ Year Member



Hi guys I tried this but it does not work!
What is wrong?

<?
$band = "beatles"
define ("MYFAVBAND", "$band is my favourite band");
echo MYFAVBAND;
?>

I got this error
"Parse error: parse error in /home/intel/public_html/test/phpdefine.php on line 3"

Timotheos

11:12 pm on Mar 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're missing a ; at the end of line 2.

haryanto

11:26 pm on Mar 11, 2004 (gmt 0)

10+ Year Member



how embarassing!

brucec

2:38 am on Mar 12, 2004 (gmt 0)

10+ Year Member



I was going to say that you missed the $ from the variable. LOL