You are here: Re: How to make a variable named after the value of another variable? « PHP Language « IT news, forums, messages
Re: How to make a variable named after the value of another variable?

Posted by Kimmo Laine on 08/24/05 13:31

<talthen.z-serwera.o2@nospam.pl> wrote in message
news:dehd34$itb$1@atlantis.news.tpi.pl...
> "Norman Peelman" <npeelman@cfl.rr.com>
> This is how I solved thr problem:
> $var="thename"
> $_REQUEST[$var]="the value";
> It creates the variable $_REQUEST['thename']="the value". I just wondered
> how to do it with $$ method. However it seems that global variables cannot
> be variable variables in another way, that $_REQUEST[$var]="the value";
>


Why do you write to $_REQUEST in the first place? $_REQUEST is the array
that holds all the userinputs, so why would you want to write into that? And
also why would you use variable variables method for this, when a simple
array reference is much more simple. This makes no sense at all to me.

--
Welcome to Usenet! Please leave tolerance, understanding
and intelligence at the door. They aren't welcome here.
eternal piste erection miuku gmail piste com

 

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

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