Reply to Re: echo VARIABLES

Your name:

Reply:


Posted by Maximus on 01/12/07 09:30

That's not the case,

The case is: I have a database table with rows ID and NAME

ID=1 NAME=$home
ID=2 NAME=$about

I make a mysql_fetch_object that grabs the data and echos it in a
table. I want it to echo $home where $home is a variable with some
value.

I need the user to view the $home value .. not the word "$home" itself.

Erwin Moller wrote:
> Maximus wrote:
>
> > Guys,
> >
> > I have a mysql query that grabs data from the table ... the data is
> > "variable names" something like $home $about $contact
> >
> > I need the loop to echo those variables as PHP Code, so that they are
> > replaced with the variable value and not the variable name.
> >
> > any quick function for that?
>
> Hi,
>
> $bla = "myvarname";
> $myvarname = "I am some var";
> echo $$bla;
>
> Regards,
> Erwin Moller

[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

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