title: Parse string as array in PHP
body: <p>I'm new to PHP and could not find a proper answer to this.</p>
  
  <pre><code>$whatever = "array('Test','Blah')";
  echo $parsed[2]; //This will be "Blah"
  </code></pre>
  
  <p>I want to create a variable called <code>$parsed</code> which contains <code>$whatever</code>'s value but as a valid array instead of a string.</p>
  
  <p>I'm aware I can just create the array by removing the quotation marks around it like this:</p>
  
  <pre><code>$whatever = array('Test','Blah');
  </code></pre>
  
  <p>In the actual code I'm working on, though, this isn't a possibility. Also, in my actual code, the array is multidimensional, so something involving a character replacement would probably be impractical, however I'm not ruling it out if it's the best option.</p>
  
  <p>So to sum it up, what's the best way to go about parsing a string as an array in PHP?</p>