Reply to Re: converting array $row values to $string

Your name:

Reply:


Posted by Kimmo Laine on 10/26/48 11:53

"monomaniac21" <mcyi2mr3@googlemail.com> wrote in message
news:1153393402.467503.199960@i42g2000cwa.googlegroups.com...
> What i cant see is how the function finds out the name given to each
> row of the array?
>
> Can anyone explain this to me?


It's using a feature of php called variable variable.

let's say you have a couple of variables:
$name = "fred flintstone";
$pointer = "name";

You can point to variable $name with the $pointer using the variable
variable syntax: $$pointer is evaluated as $"name", and since $pointer
contains the string "name".

echo $$pointer; // This will print "fred flintstone"

The very same mechanisms is used in the example function.

--
"ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk
spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)

[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

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