|
Posted by Rik on 08/13/07 16:39
On Mon, 13 Aug 2007 18:36:20 +0200, gosha bine <stereofrog@gmail.com>
wrote:
> On 13.08.2007 17:32 zzapper wrote:
>> Hi,
>> Have tried to google this without 100% satisfaction.
>> A function reads a mysql record into an array and returns it, if it
>> doesnt exist it returns '' or FALSE.
>> What ways do I have to test that my returned array is not empty
>
>
> if(array_filter($ary))
> $ary contains at least one non-empty element
> else
> $ary contains 0 elements or all elements are empty
Hmmz, didn't know this would work, but offcourse simple converting to
boolean would do the trick, away with my functions :)
--
Rik Wasmus
Navigation:
[Reply to this message]
|