php - Passing Array Using Html Form Hidden Element -
i trying post array in hidden field , want retrieve array after submitting form in php.
$postvalue=array("a","b","c"); <input type="hidden" name="result" value="<?php echo $postvalue; ?>">
but getting array string after printting posted value. how can solve it?
$postvalue=array("a","b","c"); foreach($postvalue $value) { echo '<input type="hidden" name="result[]" value="'. $value. '">'; }
and got $_post['result']
array
print_r($_post['result']);
Comments
Post a Comment