title: PHP: Pass multidimensional array between pages? Serialize/unserialize not working
body: <p>I'm using hidden forms to pass variables between pages (using POST). It's working fine for scalar variables; however, when I try to use arrays I've supposedly passed, it looks like the value I'm actually getting is "Array".</p>
  
  <p>I've searched the internet looking for a solution, and <a href="http://phpprogramming.wordpress.com/2007/05/06/php-passing-array-using-hidden-form-element/" rel="nofollow">this</a> looked promising, but I don't know if it's feasible considering that my arrays contain other arrays.</p>
  
  <p>Then I saw <a href="http://www.php.net/manual/en/function.serialize.php" rel="nofollow">the serialize function</a> and hoped that might work, but it's not working. I tried <a href="http://davidwalsh.name/php-serialize-unserialize-issues" rel="nofollow">this fix</a> but it's still not working. Here's my code on the form page:</p>
  
  <pre><code>$sendInfo = base64_encode(serialize($info));
  echo '&lt;input type="hidden" name="info" id="info" value="'.$sendInfo.'"/&gt;';
  </code></pre>
  
  <p>Then on the processing page:</p>
  
  <pre><code>$info = unserialize(base64_decode($_POST['info']));
  </code></pre>
  
  <p>Can anyone know why this isn't working? Is there a fix, or do you have another recommendation for passing the array?</p>