Re: [PHP] how to get var name and value from function?

2007-04-19 Thread Richard Lynch
On Thu, April 19, 2007 9:21 am, Tijnema ! wrote: > Hmm, that's quite ugly, what happens when defining a variable outside, > and inside a function. and then get the reference to it? Will the > first var be overwritten, and when the function ends, it will refer to > the old var again? I can't un-twi

RE: [PHP] how to get var name and value from function?

2007-04-19 Thread Richard Lynch
On Thu, April 19, 2007 3:34 am, Ford, Mike wrote: > But, notwithstanding that, how about Example 12.3 at > http://php.net/global#language.variables.scope.global? That's good enough for me. Just never noticed it before. Thanks! -- Some people have a "gift" link here. Know what I want? I want yo

Re: [PHP] how to get var name and value from function?

2007-04-19 Thread Tijnema !
On 4/19/07, Ford, Mike <[EMAIL PROTECTED]> wrote: On 19 April 2007 04:36, Richard Lynch wrote: > On Wed, April 18, 2007 4:57 am, Ford, Mike wrote: > > On 17 April 2007 01:18, Richard Lynch wrote: > > > Or is it explicitly stated in the manual somewhere I'm not seeing > > > that one can put thing

RE: [PHP] how to get var name and value from function?

2007-04-19 Thread Ford, Mike
On 19 April 2007 04:36, Richard Lynch wrote: > On Wed, April 18, 2007 4:57 am, Ford, Mike wrote: > > On 17 April 2007 01:18, Richard Lynch wrote: > > > Or is it explicitly stated in the manual somewhere I'm not seeing > > > that one can put things in $GLOBALS directly? [shrug] > > > http://uk2.ph

RE: [PHP] how to get var name and value from function?

2007-04-18 Thread Richard Lynch
On Wed, April 18, 2007 4:57 am, Ford, Mike wrote: > On 17 April 2007 01:18, Richard Lynch wrote: >> Or is it explicitly stated in the manual somewhere I'm not seeing >> that >> one can put things in $GLOBALS directly? [shrug] > http://uk2.php.net/manual/en/language.variables.predefined.php#language

RE: [PHP] how to get var name and value from function?

2007-04-18 Thread Ford, Mike
On 17 April 2007 01:18, Richard Lynch wrote: > On Mon, April 16, 2007 12:10 pm, Ford, Mike wrote: > > No, not "just another array" (although I agree about the function > > being pretty useless!) -- $GLOBALS is a superglobal array that > > contains a reference to every variable defined in the globa

RE: [PHP] how to get var name and value from function?

2007-04-16 Thread Richard Lynch
On Mon, April 16, 2007 12:10 pm, Ford, Mike wrote: > No, not "just another array" (although I agree about the function > being pretty useless!) -- $GLOBALS is a superglobal array that > contains a reference to every variable defined in the global scope, so > that accessing $GLOBALS['var'] from anyw

Re: [PHP] how to get var name and value from function?

2007-04-16 Thread Richard Lynch
On Fri, April 13, 2007 7:49 pm, Afan Pasalic wrote: > I have to assign value of an array to variable named after key of the > array several times in my project to , e.g. after I submit a form with > personal info I have > $_POST['name'] = 'john doe'; > $_POST['address'] = '123 main st.'; > $_POST['

Re: [PHP] how to get var name and value from function?

2007-04-16 Thread Jim Lucas
Afan Pasalic wrote: hi, this one I can't figure out: I have to assign value of an array to variable named after key of the array several times in my project to , e.g. after I submit a form with personal info I have $_POST['name'] = 'john doe'; $_POST['address'] = '123 main st.'; $_POST['city'] =

Re: [PHP] how to get var name and value from function?

2007-04-16 Thread Tijnema !
On 4/16/07, Ford, Mike <[EMAIL PROTECTED]> wrote: On 16 April 2007 16:18, Tijnema ! wrote: > On 4/16/07, Ford, Mike <[EMAIL PROTECTED]> wrote: > > On 14 April 2007 13:16, Afan Pasalic wrote: > > > > > Tijnema ! wrote: > > > > On 4/14/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: > > > > > function

RE: [PHP] how to get var name and value from function?

2007-04-16 Thread Ford, Mike
On 16 April 2007 16:18, Tijnema ! wrote: > On 4/16/07, Ford, Mike <[EMAIL PROTECTED]> wrote: > > On 14 April 2007 13:16, Afan Pasalic wrote: > > > > > Tijnema ! wrote: > > > > On 4/14/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: > > > > > function value2var($array, $print=0) > > > > > { > > > > >

Re: [PHP] how to get var name and value from function?

2007-04-16 Thread Tijnema !
On 4/16/07, Ford, Mike <[EMAIL PROTECTED]> wrote: On 14 April 2007 13:16, Afan Pasalic wrote: > Tijnema ! wrote: > > On 4/14/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: > > > function value2var($array, $print=0) > > > { > > >foreach ($_POST as $key => $value) > > > > I think you should chang

RE: [PHP] how to get var name and value from function?

2007-04-16 Thread Ford, Mike
On 14 April 2007 13:16, Afan Pasalic wrote: > Tijnema ! wrote: > > On 4/14/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: > > > function value2var($array, $print=0) > > > { > > >foreach ($_POST as $key => $value) > > > > I think you should change above line to : > > > >foreach ($array as $k

Re: [PHP] how to get var name and value from function?

2007-04-15 Thread Zoltán Németh
2007. 04. 14, szombat keltezéssel 08.15-kor Afan Pasalic ezt írta: > Tijnema ! wrote: > > On 4/14/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: > >> hi, > >> this one I can't figure out: > >> > >> I have to assign value of an array to variable named after key of the > >> array several times in my pro

Re: [PHP] how to get var name and value from function?

2007-04-14 Thread Afan Pasalic
Tijnema ! wrote: > On 4/14/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: >> hi, >> this one I can't figure out: >> >> I have to assign value of an array to variable named after key of the >> array several times in my project to , e.g. after I submit a form with >> personal info I have >> $_POST['name

Re: [PHP] how to get var name and value from function?

2007-04-14 Thread Tijnema !
On 4/14/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: hi, this one I can't figure out: I have to assign value of an array to variable named after key of the array several times in my project to , e.g. after I submit a form with personal info I have $_POST['name'] = 'john doe'; $_POST['address'] =

[PHP] how to get var name and value from function?

2007-04-13 Thread Afan Pasalic
hi, this one I can't figure out: I have to assign value of an array to variable named after key of the array several times in my project to , e.g. after I submit a form with personal info I have $_POST['name'] = 'john doe'; $_POST['address'] = '123 main st.'; $_POST['city'] = 'urbandale'; $_POST['