note 77387 deleted from function.serialize by nlopess

From: Date: Sat, 01 Sep 2007 16:34:44 +0000
Subject: note 77387 deleted from function.serialize by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-130062@lists.php.net to get a copy of this message
Note Submitter: euromark at web dot de ---- Funny thing... I serialized an array $thenumbers[] with 5-6 item in it. $numbers=serialize($thenumbers); $_SESSION['admin_numbers']=$numbers; But when i unserialized them, the count() function does only return a correct number, if the array got at least 1 item. $findarray= unserialize($_SESSION['admin_numbers']); echo count($findarray); so if the session variable is empty, it will still return 1 instead of 0... what can i do? its kinda important because this way i wanted to check, if the session has some values in it - to use them in on the page thank you

« previous php.notes (#130062) next »