Reply to Re: Entering a big string as a block...

Your name:

Reply:


Posted by Richard Levasseur on 08/20/06 20:27

a.r.austin@gmail.com wrote:
> There was some PHP built in syntax method to enter huge strings as
> blocks of text.
>
> I don't remember exactly how it goes and not many people use it, thus,
> google search was unsuccessful to me:
>
> $a = [MYKEY]
> text text text
> [/MYKEY];
>
> Well, it went something like that... Anyone can help me remember
> exactly what was the syntax and a correct name of this method?

You must be refering to HEREDOC syntax.

echo <<<TOKEN
text $variable "quotes" 'single'

TOKEN;

The ending TOKEN must begin at column one. Any white space before it
will not be stripped out, and PHP will not recognize it as the end of
the HEREDOC block.

[Back to original 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

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