Help for this page

Select Code to Download


  1. or download this
    $num = '-0.0000009';
    $num = sprintf("%7.5f",$num);
    $num = $num == 0 ? '0.00000' : $num;
    print "$num\n";
    
  2. or download this
    $num = sprintf("%7.5f",$num) || '0.00000';
    
  3. or download this
    $num = sprintf("%7.5f",$num)+0 || '0.00000';