Instead of using serialize, I just use urlencode () and urldecode ().
Changed the array in a different format.
$info = 'name=Sander&type=melon'; echo '<input type="hidden" name="rank[]" value="'.urlencode($info).'" >';
Then I can simply display the following values:
if(!empty($_POST['rank'])){ $list = $_POST['rank']; $listSize = count($list); for($i=0;$i<$listSize;$i++){ parse_str(urldecode($list[$i]), $output); var_dump($output); } }
The problem is resolved :)
source share