Re: Beginning php study
- From: "Ken Robinson" <kenrbnsn@xxxxxxxxx>
- Date: 18 Jun 2005 02:40:54 -0700
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
.
- Follow-Ups:
- Re: Beginning php study
- From: Wings
- Re: Beginning php study
- References:
- Beginning php study
- From: Wings
- Beginning php study
- Prev by Date: Beginning php study
- Next by Date: Re: Beginning php study
- Previous by thread: Beginning php study
- Next by thread: Re: Beginning php study
- Index(es):
Relevant Pages
|