title: Convert string to float in PHP
body: <p>I have a string value like this "0.00050722" and I want to convert its data type to <a href="http://www.php.net/manual/en/language.types.float.php" rel="nofollow">double/float</a>.</p>
  
  <p>I've been trying <a href="http://www.php.net/manual/en/function.floatval.php" rel="nofollow">floatval()</a> and <a href="http://www.php.net/manual/en/function.doubleval.php" rel="nofollow">doubleval()</a> but it always returns me a value of 0.</p>
  
  <p>I need to get the exact of amount of 0.00050722 in a float datatype.</p>