Arhh man, that was embarrasing...

Thanks! I guess I didn't get enough coffee this morning :/

T.
Cc Zona wrote:
> 
> In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Thomas Wentzel) wrote:
> 
> > $test=@file("some_non_existing_file");
> >
> > Can somebody explain why count($test) is 1. When $test doesn't hold any
> > data
> 
> From <http://www.php.net/manual/en/function.count.php>:
> 
> "If var is not an array, 1 will be returned"
> 
> When file() failed to open your non-existing file, it returned false. False
> isn't an array, so count() returned 1.
> 
> --
> CC

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

Reply via email to