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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux