How To pass an Array in the Querystring Using PHP
I recently ran across a silly WordPress situation where I needed to pass an array in the querystring. Here’s what I came up with:
$array = array('a' => 1, 'b' => 2, 'c' => 3);
$array = rawurlencode(serialize($array));
echo 'Pass array';
Then on the receiving getarray.php:
$array = unserialize(stripslashes($_GET['error_array']));