note 97772 modified in function.empty by danbrown

From: Date: Fri, 07 May 2010 12:33:27 +0000
Subject: note 97772 modified in function.empty by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-169051@lists.php.net to get a copy of this message
To find if an array has nothing but empty (string) values: <?php $foo = array('foo'=>'', 'bar'=>''); $bar = implode('', $foo); if (empty($bar)) { echo "EMPTY!"; } else { echo "NOT EMPTY!"; } ?> --was-- To find if an array has nothing but empty (string) values: $foo = array('foo'=>'', 'bar'=>''); $bar = implode('', $foo); if (empty($bar)) { echo "EMPTY!"; } else { echo "NOT EMPTY!"; } http://php.net/manual/en/function.empty.php

« previous php.notes (#169051) next »