
Originally Posted by
Sorry
master, what is serialize?
i googled it pero lisod kaau sabton dah..
hehe
serialize - Generates a storable representation of a value.
usually this is used when storing ARRAY on the database
HTML
PHP Code:
<form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
<input type="text" name="test[]" value="test1" />
<input type="text" name="test[]" value="test2" />
<input type="text" name="test[]" value="test3" />
<input type="submit" value="Submit"/>
</form>
Source Code
PHP Code:
<?php
print_r($_REQUEST['test']);
echo serialize($_REQUEST['test']);
?>
Output
HTML Code:
Array ( [0] => test1 [1] => test2 [2] => test3 )
a:3:{i:0;s:5:"test1";i:1;s:5:"test2";i:2;s:5:"test3";}
and if you want to read the value again... use the
unserialize