|
Posted by Wings on 06/18/05 21:11
"Ken Robinson" <kenrbnsn@rbnsn.com> wrote in message
news:1119087654.704106.15530@g49g2000cwa.googlegroups.com...
>
>
> Wings wrote:
>> Hi, just beginning my study of php and got stuck right off the bat. I
>> saved
>> the following to a page called test.php.
>>
>> <? php
>> $age = 67;
>> echo $age;
>> ?>
>>
>> Looking at it in the browser I get
>>
>> Parse error: syntax error, unexpected T_VARIABLE in
>> C:\XAMPP\xampplite\htdocs\nitefly\FCU\FCU\test.php on line 6
>>
>> Line 6 was the $age=67.
>
> PHP often reports an error where it gives up trying to parse something,
> not where the error really is.
>
> In your case, you have a space where no space should be. You have '<?
> php', it should be '<?php' or if short tags are enabled, just '<?'.
>
> Ken
>
Many thanks, Ken. I took that space out. It didn't help, but I was glad to
have that pointed out to me. Then I noticed that I had spaces in the line
$age = 67. I took those out and now the program works. This is actually
annoying as the text I'm using clearly shows those spaces in there.
Navigation:
[Reply to this message]
|