About the unexpected T_VARIABLE
| From: | michael @ skys . com . cn | Date: | Wed, 29 Dec 2004 05:40:52 +0000 |
| Subject: | About the unexpected T_VARIABLE | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-25198@lists.php.net to get a copy of this message | ||
Hi;
I'm new in php. I has try some sample code in the book
<? php
$hamburger = 4.95;
$milkshake = 1.95;
$cola = .85;
$food = 2 * $hamburger + $milkshake + $cola;
$tax = $food * .075;
$tip = $food * .16;
$total = $food + $tax + $tip;
print "Total cost of the meal is \$$total";
?>
But I always get "Parse error: syntax error, unexpected T_VARIABLE in
e:\Inetpub\wwwroot\meal.php on line 2"
So any suggestion
Regards
Michael