I want to pass an array through hidden fields.but I'm unable to do that.
the keyword "Array" appears when I tried to display the array in the other script
I also want to assign the values of the array to a varible.I'm pasting my code.Plz do check it & CORRECT it.
& also tell my mistake.there are two scripts.1) display.php 2) save.php
I'm writting this code inhurry,so neglect small errors.Thanx
//display.php
<head>hi </head>
<body>
<?php
$countries=array(1,2,4,6);
?>
<form action="save.php" method="post" >
<input type="hidden" name="places[]" value="<?php echo $countries; ?>">
<input type="submit value="Save">
</form> </body>
//save.php
<?php
$value="";
do {$val=current($places);
echo("Element is $val<br>");
$value.=$val;
} while(next($places));
?>