title: unserialize array
body: <p>I am return a serialize array from a post meta field in wordpress called groups.</p>
  
  <p>here is how it looks in to post meta field.</p>
  
  <pre><code>a:2:{i:0;s:1:"1";i:1;s:1:"2";}
  </code></pre>
  
  <p>how can i loop trough this and run an if statement i.e.</p>
  
  <pre><code>$mydata = unserialize($meta['groups']);
  
  print_r($mydata);
  </code></pre>
  
  <p>The unserialzed isnt working for me the ouput i get from the print_r is below</p>
  
  <pre><code>a:2:{i:0;s:1:"1";i:1;s:1:"2";}
  </code></pre>
  
  <p>which is same as above.</p>
  
  <p>Any help on working with serialized and unserialzed arrays never used before.</p>