What about: count($arrayname) Should tell you how many items are in an array. > -----Original Message----- > From: Aaron Wolski [mailto:aaronjw@martekbiz.com] > Sent: Wednesday, February 05, 2003 4:04 PM > To: php-db@lists.php.net > Subject: checking for empty array from a form field? > grrrrrrrrrrr! > > > 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 > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php