title: Warning: number_format() expects parameter 1 to be double, string given in
body: <p>I am getting the following error:</p>
  
  <blockquote>
    <p>Warning: number_format() expects parameter 1 to be double, string given in............. on line 200</p>
  </blockquote>
  
  <p>Please tell me the solution for it. Below I have posted my whole code till line 200</p>
  
  <pre><code>&lt;?php
  function my_session_start() {
      session_start();
  }
  
  function escape($str) {
      $clean_str = ( get_magic_quotes_gpc ()) ? mysql_real_escape_string(stripslashes(trim($str))) : mysql_real_escape_string(trim($str));
      return $clean_str;
  }
  
  function _addslashes($str) {   
      $clean_str = ( get_magic_quotes_gpc ()) ? $str : addslashes($str);
      return $clean_str;
  }
  
  function clean($str) {
      $clean_str = stripslashes (trim($str));
      return $clean_str;
  }
  
  function checkbox_value($str) {
      if(isset($_POST[$str]) &amp;&amp; $_POST[$str]=="on") return 1;
      return 0;    
  }
  
  function generate_random() {
      $str = md5(uniqid(rand(),1));
      return $str;
  }
  
  function html_link($str) {
      $str=correct_href($str);
      $ret='&lt;a href="'.$str.'"&gt;'.$str.'&lt;/a&gt;';
      return $ret;
  }
  
  function correct_href($str) {
      if(!trim($str)) return;
      if(strcmp(substr($str,0,7),"http://") &amp;&amp; strcmp(substr($str,0,8),"https://")) $str="http://".$str;
      return $str;
  }
  
  function correct_number_format($str) {
      $app = new appearance();
      $appearance = $app-&gt;getAll();
      $decimals = $appearance['number_format_decimals']; 
      $point = $appearance['number_format_point'];  
      $separator = $appearance['number_format_separator']; 
      $ereg_str = "/^[0-9]*".$point."*[0-9]+".$separator."*[0-9]*$/";
      $ereg_str = str_replace(".", "\.", $ereg_str);
      if(preg_match($ereg_str, $str)) return 1;
      return 0;    
  }
  
  function correct_numeric($str) {
      global $appearance_settings;
      $point = $appearance_settings['number_format_point'];
      $separator = $appearance_settings['number_format_separator'];
      // replace 
      $str = str_replace($point,"#",$str);
      $str = str_replace($separator,"",$str);
      $str = str_replace("#",".",$str);
      return $str;
  }
  
  function correct_price($str) {
      global $appearance_settings;
      $point = $appearance_settings['price_format_point'];
      $separator = $appearance_settings['price_format_separator'];
      // replace 
      $str = str_replace($point,"#",$str);
      $str = str_replace($separator,"",$str);
      $str = str_replace("#",".",$str);
      return $str;    
  }
  </code></pre>