title: How do I create variables based on an array? PHP
body: <p>I'm quite confused in how would I be able to create variable based on an array's values, my code is:</p>
  
  <pre><code>$a = array("red","black","white","green","blue");
  
  for($i=0;$i&gt;5;$i++)
  {
  $$a[$i] = '0.00';
  }
  
  echo $red;
  </code></pre>
  
  <p>I was under the impression that emulating a statement that says <code>$red = '0.00';</code> would run properly but alas, it says undefined variable red.</p>