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

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -