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

[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=".$db_name.

Re: [PHP] looping variables

2001-02-08 Thread Michael Dearman
Hey Wen, Had me going there for a bit, cause I had just put down a book on C, where variables are not preceded by such things as $. But for PHP, your missing a few $'s on your variables. And, your taking care of matching that javascript opening tag from where your calling this function? MD Wen

[PHP] looping variables

2001-02-08 Thread Wen Ni Leong
Please help me to solve this problem. I have looping selected menu and I want to use javascript to control each function. For example if select Text Form,the javascript will automate to open new window. Right now my problem is I can't differentiate from which menu or location I had selected beca