On Sunday 18 February 2001 21:26, [EMAIL PROTECTED] 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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to