You are here: Re: [PHP] Array - partical path to the array's path.... « PHP « IT news, forums, messages
Re: [PHP] Array - partical path to the array's path....

Posted by "Scott Fletcher" on 09/27/05 22:55

Wow, that seem to work... Should have use "$suffix" instead of "$prefix" to
make it less confusing.

"Silvio Porcellana" <sporc@tin.it> wrote in message
news:43398984.9020505@tin.it...
> Scott Fletcher wrote:
>
> >What I want this to work instead is
> >[code]
> > $array = array();
> >
> > $array['col1']['col2'] = "Test #1";
> > $array['col3']['col2'] = "Test #2";
> >
> > $prefix = "['col3']['col2']";
> >
> > echo $array.$prefix; //Spitted out result as "Test #2"...
> >[/code]
> >
> >
> Try something like this:
> <code>
> $var = "\$array".$prefix;
> eval("echo $var;");
> </code>
>
> HTH, cheers
> Silvio

 

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

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