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 = $value\n"; } Cool, thanks, will try it out. > If there are multi-dimensional arrays, then > yo

Re: [PHP] looping variables from a file

2004-03-24 Thread John W. Holmes
rch 24, 2004 1:22 PM Subject: Re: [PHP] looping 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 (bare

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 ha

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 > h

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