You are here: Re: foreach « All PHP « IT news, forums, messages
Re: foreach

Posted by Vince Morgan on 04/15/07 07:26

"J.O. Aho" <user@example.net> wrote in message
news:58dq4bF2gg80nU1@mid.individual.net...
> It's mainly used to tell what is a variable in a string, say you have a
> variable called $hell and you have the following
>
> echo "$hellohm's";
>
> this would try to use the variable $hellohm, which most likely would be an
> empty variable and result in a string: 's
>
> echo "{$hell}ohm's";
>
> this would use the value of $hell and add ohm's after the value.
>
> The brackets works outside string too, even if it's not that nice looking
IMHO.
>
> In the last line ${$val} is the same as $$val, which makes that the value
of
> $val is used as a variable name, say you
>
> $hello=5;
> $val="hello";
> echo $$val; //will echo the $hello value
>
>
> --
>
> //Aho
Thank you very much indeed.
I think your IMHO is a very valid HO ;)
The revs have reduced a little, but my head is still spinning.
Regards,
Vince

 

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

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