Page 1 of 1

Automatic variable creation

Posted: Fri Aug 31, 2007 5:15 am
by nmb
hi pp!

with the follow table from mysql

Code: Select all

id  cnfgvar              cnfgopc
1   cnf_sitetitle        Site 
2   cnf_siteurl          http://www.site.com/ 
3   cnf_siteemail        site@site.pt 
4   cnf_description      Descrição do site 
5   cnf_keywords         descrição, dos, conteúdos, do, site 
6   cnf_siteyear         2007 
7   cnf_upl_ima_max      100000 
8   cnf_timeoutseconds   600 
9   cnf_usr_cnt_snc      1157985233
is possible to create automatic php variable from a mysql query?

for ex. for the table up I want to create a loop (while) that's generate the php code:

$cnf_sitetitle = "Site ";
$cnf_siteurl = "http://www.site.com/ "
...and so on...

is this possible?

tnks pp!

Posted: Fri Aug 31, 2007 5:20 am
by mcog_esteban

Posted: Fri Aug 31, 2007 6:04 am
by nmb
it works! thanks man!