Oops, I didn't mean to post the same code that's been posted. The
subject sorter doesn't work correctly on Netscape Messenger. I thought
I had finished reading the thread.
My apologies,
Robin
Robin Chen wrote:
>
> <?
>
> $required = array('name','address','phone');
> $has_empty = 0;
>
> foreach ($required as $var) {
> if (!is_set($$var)) $has_empty = 1;
> }
>
> if ($has_empty) print 'You left one empty.';
>
> ?>
>
> You don't need to use the $has_empty variable, but I thought it would be
> better to just display the message once.
>
> Robin
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]