title: JSON encode to two variables PHP
body: <p>I have those values from my cookie:</p>
  
  <pre><code>a:2:{i:0;s:22:"302260 302250 302248";i:1;s:38:"Bruce Willis Jackie Chan Gary Oldman";}
  </code></pre>
  
  <p>I need this data to be separated like this:</p>
  
  <pre><code>$variable1 = [302260,302250,302248];
  $variable2 = [Bruce Willis, Jackie Chan, Gary Oldman];
  </code></pre>
  
  <p><code>json_decode</code> returned <code>NULL</code>, <code>unserialize</code> returned:</p>
  
  <pre><code>array ( 0 =&gt; '302260 302250 302248', 1 =&gt; 'Bruce Willis Jackie Chan Gary Oldman')
  </code></pre>
  
  <p>Now I don't know how to explode the names to <code>["Bruce Willis", "Jackie Chan", "Gary Oldman"]</code>.</p>