This is a simple and basic example of how to serialize and unserialize a variable, or in this case an array.
<?php
// Serialize
$ser = serialize(array('php', 'aspx', 'java'));
// Unserialize
$unser = unserialize($ser);
// Print the unserialized
print_r($unser);
?>
Array (
[0] => php
[1] => aspx
[2] => java
)
[0] => php
[1] => aspx
[2] => java
)
Mail this!
- Comments (0)
- PingBacks (0)
- TrackBacks (0)


» Latest comments