----- 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<br>";
>      }
>
>  }
> }

Since php variable scope is local unless you define it global, that won't
work that way.  You might try (just guessing here):
 function myFunction() {
   foreach($_POST as $key=>$value) {
       global $$key;
       if (empty($$key)) {
          print "empty value $key<br>";
      }
   }
 }



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to