You are here: Re: Beginning php study « PHP « IT news, forums, messages
Re: Beginning php study

Posted by Wings on 06/18/05 21:24

"Wings" <glenn61@earthlink.net> wrote in message
news:EtZse.5728$hK3.2196@newsread3.news.pas.earthlink.net...
>
> "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.
>
As a final note here, I retyped all the lines, with the spaces in $age = 67.
With your correction and the retyping, it now works. I have a propensity to
hit two keys sometimes when I'm headed for one and I think I inserted some
kind of invisible character in there.

Thanks again. Now we can get on with this...

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация