1 2 3 4 5 6 7 8 9 10 |
<?php $cars=array("Volvo","BMW","Toyota"); ?> <form action="getpassedarray.php" method="post" name="form1"> <input type="text" name="carsarray" value="<?php print base64_encode(serialize($cars)) ?>"> <input type="submit" name="submit"> </form> |
getpassedarray.php
1 2 3 4 5 6 7 |
<?php $carsarray = $_POST['carsarray']; $newcarsarray = unserialize(base64_decode($carsarray)); var_dump($newcarsarray); ?> |