title: How can I convert all values of an array to floats in PHP?
body: <p>I am fetching an array of floats from my database but the array I get has converted the values to strings.</p>
  <p>How can I convert them into floats again without looping through the array?<br />
  Alternatively, how can I fetch the values from the database without converting them to strings?</p>
  <hr />
  <h3>EDIT:</h3>
  <ul>
  <li><p>I am using the Zend Framework and I am using PDO_mysql. The values are stored one per column and that is a requirement so I can't serialize them.</p>
  </li>
  <li><p><code>array_map('floatval', $array)</code> only works on single dimensional arrays.</p>
  </li>
  <li><p>I can't <code>floatval</code> the single elements when I use them because I have to pass an array to my flash chart.</p>
  </li>
  <li><p>The momentary, non-generic solution is to extract the rows and do <code>array_map('floatval',$array)</code> with each row.</p>
  </li>
  </ul>