I want to pass my php array in my form input type as hidden.i have tried many times but it is giving me an array (key=>value,key=>value) in my input form.
This is my php code have a array.
$my_arr = array();
$my_arr['key']="value";
This is my html code
<form method="post" action="next.php">
<input type="hidden" name="my_form_data" value="<?php print_r($my_arr) ?>">
<button name="submit_btn">Submit</button>
</form>
Any one please help me to pass php array in my input hidden element and how to get it in next page.