p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: Serializing?


Message #1 by "John Arbon" <subscriptions@c...> on Fri, 3 May 2002 14:56:30
Just what is 'serializing' data?

John
Message #2 by "Nikolai Devereaux" <yomama@u...> on Fri, 3 May 2002 08:58:07 -0700
> Just what is 'serializing' data?

In PHP, serializing data means that you're coming up with a string
representation of that data to allow it to be easily stored to disk or a
database.

You can pass an object, array (however nested), or primitive data type to
serialize(), and you'll be returned a string that you can store in a
database or in a text file.  Or quite possibly as the value of a form input
field.

It's in a format that PHP is able to parse with unserialize() and recreate
the original array or object.


Nik

Message #3 by "John Arbon" <subscriptions@c...> on Sat, 4 May 2002 01:23:56
Nik,

Thanks!

John

> 
> Just what is 'serializing' data?

In PHP, serializing data means that you're coming up with a string
representation of that data to allow it to be easily stored to disk or a
database.

You can pass an object, array (however nested), or primitive data type to
serialize(), and you'll be returned a string that you can store in a
database or in a text file.  Or quite possibly as the value of a form input
field.

It's in a format that PHP is able to parse with unserialize() and recreate
the original array or object.


Nik


  Return to Index