Re: Unserialize bug?

From: Date: Thu, 22 May 2003 04:57:28 +0000
Subject: Re: Unserialize bug?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-148499@lists.php.net to get a copy of this message
On Thursday 22 May 2003 06:33, Leon Mergen wrote: > I'm currently experiencing a little problem with unserializing an > array-in-array. This is the relevant part of my code: > > <? > echo "basketarray : $basketarray\n\n"; > echo "Unserialized:\n"; > print_r(unserialize($basketarray)); > ?> > > and it shows > > basketarray : a:1:{i:23;a:2:{i:0;s:6:\"item14\";i:1;s:6:\"item29\";}} > > Unserialized: > > so basically, the array doesn't get unserialized properly. Anyone has any > workaround or fix for this? Turn on error reporting and you will see that unserialize() does not like the format of $basketarray. It seems that you have backslashes in there which shouldn't be there. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* All great ideas are controversial, or have been at one time. */

« previous php.general (#148499) next »