Re: array - too stupid

From: Date: Mon, 19 Feb 2001 07:24:55 +0000
Subject: Re: array - too stupid
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-40515@lists.php.net to get a copy of this message
On Sunday 18 February 2001 21:26, myviva@utanet.at wrote: > > hi, > > how can i store an array in mysql ? > > > what i do now ( works fine ) > ======================== > > > a) transform the array to a § delimeted string > // $tempItem is a § dlimited string example: 4321§117§A123§42WQ§1243 > b) $tempItem = serialize($tempItem); Just $tempitem = serialize($myarray); will work fine. > c) store it in mysql-table > > and i get my array back with > > > d) $myItems = explode("§",unserialize($myValueFromDB)); $myItems = unserialize ($myValueFromDB); -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) I sat laughing snidely into my notebook until they showed me a PC running Linux. And oh! It was as though the heavens opened and God handed down a client-side OS so beautiful, so graceful, and so elegant that a million Microsoft developers couldn't have invented it even if they had a hundred years and a thousand crates of Jolt cola. - LAN Times

« previous php.general (#40515) next »