Developer's Manual  Function Reference  Miscellaneous functions  gzSerialize

gzSerialize

Generates a compressed storable representation of a value.


string gzSerialize
(mixed variable [, bool mode])

The function returns a string that can be stored in a table. This is useful for storing or passing PHP values around without losing their type and structure. By default gzSerialize quote string with slashes. To get unquoted string pass FALSE to the function as the second parameter

Example

<?
$var
= Array('name' => 'file.doc', '1' => 'no');
echo
gzSerialize($var, FALSE);
?>
Please login to add comments.