Re: If array()

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

 



Try this:

if (is_array($array) && count($array)) {
   ...
}

John Taylor-Johnston schrieb:
How can I use "if" to see an array contains something?

if ($array()) does not work, of course.

John



--
Mit freundlichen Grüßen

Philipp Schwarz
-------------------------------------------------
comtrance
E-Mail:     p.schwarz@xxxxxxxxxxxxx
Internet:   http://www.comtrance.net
Telefon:    +49 (211) 27159 - 20
Fax:        +49 (211) 54423 - 05

Anschrift:  comtrance GmbH
           In der Steele 20
           40599 Düsseldorf

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux