RE: About the unexpected T_VARIABLE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: michael@xxxxxxxxxxx [mailto:michael@xxxxxxxxxxx]
> Sent: Wednesday, December 29, 2004 8:41 AM
> To: php-windows@xxxxxxxxxxxxx
> Subject:  About the unexpected T_VARIABLE
> 
> Hi;
> 
>   I'm new in php. I has try some sample code in the book
> <? php

Has to be <?php (notice space char).

> $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
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux