Reply to Re: creating variables in a loop

Your name:

Reply:


Posted by Tom on 06/04/07 18:39

On Mon, 04 Jun 2007 18:34:09 -0000, Damo wrote...
>
>Hi,
>I want to create variables in a loop, each with a different name. Here
>is the loop i'm using:
>
>
> if (is_array($attribs)) {
> echo "Attributes : <br />";
> while(list($key,$val) = each($attribs)) {
> echo $key."has the value".$val."<br>";
>
> }
> }
>
>I want to create a variable with the name of each $key and contain the
>value in $val.
>Is this possible?
>


You might trying using an associative array to store those, that way you know
where they are all at later when you need to find them.

Tom
--
Newsguy.com
90+ Days Retention
99% Article Completion
Create Your Own NZB Files

[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

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