[PHP] looping variables from a file

2004-03-24 Thread Ryan A
Hi, I have a config_inc.php file which has around 60 parameters set in it. eg: $db_name=something; $db_user=root; $db_pass=blah; $x_installed_path=/home/blah/; etc I have a requirment of echoing out these statements to the client to show him how his setup is: eg: echo DB_name=font color

Re: [PHP] looping variables from a file

2004-03-24 Thread Richard Davey
Hello Ryan, Wednesday, March 24, 2004, 5:29:33 PM, you wrote: RA as you can imagine the above loop will save a crapload of time RA instead of partially hard codeing each key and value but how do RA I do this while reading from a file? and the other big problem is RA the file contains one or two

Re: [PHP] looping variables from a file

2004-03-24 Thread John W. Holmes
From: Ryan A [EMAIL PROTECTED] I have a config_inc.php file which has around 60 parameters set in it. eg: $db_name=something; $db_user=root; $db_pass=blah; $x_installed_path=/home/blah/; etc I have a requirment of echoing out these statements to the client to show him how his setup is:

RE: [PHP] looping variables from a file

2004-03-24 Thread Ford, Mike [LSS]
-Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: 24 March 2004 17:30 Hi, I have a config_inc.php file which has around 60 parameters set in it. eg: $db_name=something; $db_user=root; $db_pass=blah; $x_installed_path=/home/blah/; etc I have a requirment of

Re: [PHP] looping variables from a file

2004-03-24 Thread John W. Holmes
variables from a file From: Ryan A [EMAIL PROTECTED] I knew this would be complicated when I started to write to the list for help but didnt know so complicatedI can just about understand (barely) what you guys are telling me but dont know where to start..can you give me some starting

Re: [PHP] looping variables from a file

2004-03-24 Thread Ryan A
Hey John, $array1 = get_defined_vars(); include('yourfile.php'); $array2 = get_defined_vars(); $newvars = array_diff($array2,$array1); foreach($newvars as $name = $value) { echo $name = font color=\green\$value/fontbr /\n; } Cool, thanks, will try it out. If there are multi-dimensional