Re: checking for empty array from a form field? grrrrrrrrrrr!

From: Date: Wed, 05 Feb 2003 21:28:50 +0000
Subject: Re: checking for empty array from a form field? grrrrrrrrrrr!
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-25466@lists.php.net to get a copy of this message
I usually use: while(list($key,$value) = each($products)) { echo "$key:$value"; } On Wed, 2003-02-05 at 15:03, Aaron Wolski wrote: > Argh !!!!!!!! > > > HOW does one check for an array being empty from a form field?????????? > > Tried a billion different things and NOTHING works!!!! > > I've tried: > > if ($products == "\n") { > > echo "hello"; > } > > else { > > echo "bye"; > > } > > > if ($products == "") { > > echo "hello"; > } > > else { > > echo "bye"; > > } > > > > if (empty($products)) { > > echo "hello"; > } > > else { > > echo "bye"; > > } > > > if (!isset($products)) { > > echo "hello"; > } > > else { > > echo "bye"; > > } > > > if (count($products) == 0) { > > echo "hello"; > } > > else { > > echo "bye"; > > } > > > NOTHING works!!! > > Any help.. puuulease? > > Aaron -- Mignon Hunter Web Developer Toshiba International 713.466.0277 x 3461

« previous php.db (#25466) next »