Re: checking for empty array from a form field? grrrrrrrrrrr!
| From: | jay at advmed dot com | Date: | Wed, 05 Feb 2003 01:03:43 +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-25462@lists.php.net to get a copy of this message | ||
if empty($products)
echo "its empty";
else
echo "its not empty";
jay merritt
jay@advmed.com
jaycell@advmed.com
Quoting Aaron Wolski <aaronjw@martekbiz.com>:
> 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