title: Load serialized data in to an array in PHP
body: <p>I have a jquery plugin used to re-order lists, the data that gets provided is serialized. </p>
  
  <p>For example:</p>
  
  <pre><code>[{"id":13},{"id":14},{"id":15,"children":[{"id":16},{"id":17},{"id":18},{"id":18},{"id":18},{"id":18},{"id":18},{"id":18},{"id":18},{"id":18}]}]
  </code></pre>
  
  <p>My plan is to submit the data in to a php script, load it in to an array, and then save different parts of the given data in different rows in the database. </p>
  
  <p>I'm having an issue loading this data in to an array though, my code is as follows:</p>
  
  <pre><code>&lt;?php
  $data = $_POST['data'];
  echo $data . "&lt;br /&gt;&lt;br /&gt;";
  
  $arr = unserialize($data);
  
  echo var_dump($arr);
  
  ?&gt;
  </code></pre>
  
  <p>However, when attempting to run the script with the sample of data above, I get the following error:</p>
  
  <blockquote>
    <p>Notice: unserialize(): Error at offset 0 of 144 bytes in D:..... on line 5</p>
  </blockquote>