title: Unable to convert string to float in php
body: <p>I'm trying to convert a String with a number into a float.
  I tried the following:</p>
  
  <pre><code>write_file($log . "temp=" . $temp . ".&lt;br/&gt;" , "public/files/log.txt" );
  write_file($log . "temp type=" . gettype($temp) . "&lt;br/&gt;" , "public/files/log.txt" );
  $flyt  = floatval("2.19");
  write_file($log . "2.19 float =" . $flyt . ".&lt;br/&gt;" , "public/files/log.txt" );
  $flyt  = floatval($temp);
  write_file($log . "temp float =" . $flyt . ".&lt;br/&gt;" , "public/files/log.txt" );
  </code></pre>
  
  <p>Which gives me the following results:</p>
  
  <pre><code>temp float =0.
  2.19 float =2.19.
  temp type=string
  temp=2.19.
  </code></pre>
  
  <p>When $temp is "2.19", why can't I get it to float?
  I've tried several methods, none work. What am I doing wrong?</p>