You are here: Re: inclosed variable heredoc « PHP Programming Language « IT news, forums, messages
Re: inclosed variable heredoc

Posted by hihibibihi on 12/20/06 21:22

Toby Inkster schreef:

> hihibibihi wrote:
>
> > <?php
> > $foo="NO";
> > $text=<<<EO
> > The variable is named: $foo
> > EO;
> >
> > if (TRUE)
> > {
> > $foo="YES";
> > die($text); //how to get $foo="YES" into $text?
> > }
> > ?>
>
> As Janwillem said, you're doing things the wrong way around. What I think
> you're actually asking for is a way to specify the format of the error
> message at the top of the code instead of way down the bottom when the
> error actually happens. Here, sprintf() is your friend...

Janwillem and Toby,

Thanks for your quick reply

But i dont think i made clear enough what i was aiming at (sorry about
that): i wrote a webform (html code stored in $text), if user hits
submit-button without filling in required formfields, form should
reappear with warning -message added (stored in $foo)

Any further ideas?

gr Jan

 

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

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