* Thus wrote Paweł Kondzior ([EMAIL PROTECTED]):
> Hello everybody, i have  strange  behaviour  with sizeof().
> mysql_fetch_array () return for me empty array, when i count this array by
> sizeof() it return 1, serialized array is look like this: b:0; check it:
> <?php print sizeof ( unserialize ( "b:0;" ) ); ?> it will print 1 .. why ?
> what is b:0 ? why mysql_fetch_array don't return false, when query result is
> empty ?

The problem is that mysql_fetch_array() doesn't return an empty
array.

<quote mysql_fetch_array>
Returns an array that corresponds to the fetched row, or FALSE if
there are no more rows.
</quote>

Thus it explains why the size of returns 1.

the "b:0;" basically means that this var is of type boolean and has
a value of 0.



Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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

Reply via email to