You are here: Re: [PHP] Using the echo tag... « PHP « IT news, forums, messages
Re: [PHP] Using the echo tag...

Posted by "Richard Lynch" on 10/21/57 11:31

On Tue, November 8, 2005 5:52 pm, Curt Zirzow wrote:
> On Tue, Nov 08, 2005 at 06:32:00PM -0500, Paul Williams wrote:
>> Nope sorry. It says this error "
>> Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE,
>> expecting
>> T_STRING or T_VARIABLE or T_NUM_STRING in C:\Program Files\Abyss Web
>> Server\htdocs\document1.php on line 6
>> "
>
> Acutally he is correct. You have another problem of which was
> mentioned a few times in this thread as well.
>
> You have to enclose your array variable like such:
>
> print <<<EOF
> {$array['key']}
> EOF;

Another option on that bit is to take OUT the 's around the key.

In PHP <?php code ?> you need 's around the key.
In a "string" you do NOT want the 's around the key.

It seems goofy at first, but that's the way it is.

So instead of using {}s so you can also have ''s you can just get RID
of the ''s in the first place.

--
Like Music?
http://l-i-e.com/artists.htm

 

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

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