if all you might have there is 'error', try
if(array_search('error',$array) === FALSE) {
   echo 'not ok';
}

if you might have different strings, do
$result='ok';
foreach($array as $v) {
   if($v) {
       $result ='not ok';
       break;
   }
}

Mattia wrote:

Can anyone suggest an ELEGANT way to find out if an array is made of empty
strings or not?

example

$a = Array( '' , '' , '' ); //ok
$b = Array( '' , '' , 'error' ); // not ok
$c = Array( 'error' , '' , 'error' ); // not ok

tia
Mattia





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

Reply via email to