You are here: dynamic variable name « PHP Programming Language « IT news, forums, messages
dynamic variable name

Posted by paladin.rithe@gmail.com on 11/04/91 11:41

I have no clue if this can be done, but I thought I'd ask anyway. I
have a modular system where I store module information in a database.
One of the types of modules that I have is one that, depending on the
file, could have a different variable name in each file. I have named
the module, and want to name it according to the name of the variable
(ie, modulename Joe, var $Joe) Now, this variable needs to be loaded
into a function, but not inside the file it's located. That file is
basicly a storage for it, and the variable is needed elsewhere. Is
there a way to use the modulename (Joe), and convert it to the variable
name? (func($Joe) in other words)
Another way I could do it is to just have a function that returns the
variable. That would probably be easier.
Is there a way to do this, or is it too complicated? Just using a
function to return a value would be easy.

 

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

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