RE: [PHP] Using Variable Variables from form values inside a function

2002-02-18 Thread Ford, Mike [LSS]
> -Original Message- > From: Ron Dyck [mailto:[EMAIL PROTECTED]] > Sent: 18 February 2002 13:38 > [... snip working example] > > but, this doesn't: > > function myFunction() { > foreach($_POST as $key=>$value) { > > if (empty($$key)) { > print "empty value $key"; >

Re: [PHP] Using Variable Variables from form values inside a function

2002-02-18 Thread Ron Dyck
> > but, this doesn't: > > > > function myFunction() { > > foreach($_POST as $key=>$value) { > > > > if (empty($$key)) { > > print "empty value $key"; > > } > > > > } > > } > > Since php variable scope is local unless you define it global, that won't > work that way. You migh

Re: [PHP] Using Variable Variables from form values inside a function

2002-02-18 Thread Matt
- Original Message - From: "Ron Dyck" <[EMAIL PROTECTED]> > but, this doesn't: > > function myFunction() { > foreach($_POST as $key=>$value) { > > if (empty($$key)) { > print "empty value $key"; > } > > } > } Since php variable scope is local unless you define it gl

[PHP] Using Variable Variables from form values inside a function

2002-02-18 Thread Ron Dyck
Is it possible to use variable variables from form values inside a function. For example when submitting form values, this works fine: foreach($_POST as $key=>$value) { if (empty($$key)) { print "empty value $key"; } } but, this doesn't: function myFunction() { foreach($_PO

Re: [PHP] Using Variable Variables...

2001-07-26 Thread mike cullerton
on 7/26/01 6:46 PM, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: > $_VARIABLE_ = "chkContact".$i; > $_VAR_ = $$_VARIABLE_; > > How do I make this work when $chkContact is a global variable? This > returns an empty value because it does not see that $chkContact is a > global variable... > mayb

[PHP] Using Variable Variables...

2001-07-26 Thread [EMAIL PROTECTED]
$_VARIABLE_ = "chkContact".$i; $_VAR_ = $$_VARIABLE_; How do I make this work when $chkContact is a global variable? This returns an empty value because it does not see that $chkContact is a global variable... Thankz in advance for your help!! -- [ Swift eNetwork ] Matrix http://matrix.