title: Set equation answer to two decimal in PHP
body: <pre><code>$query=mysql_query($sql,$connect);
  
  while($row = mysql_fetch_array($result3)){
      echo "Total Profit = RM ". $row['SUM(profit)'];
      echo "&lt;br /&gt;";
  }
  echo"&lt;/br&gt;";
  echo "&lt;b&gt;&lt;u&gt;Total Profit earned &lt;/u&gt;&lt;/b&gt;" ;
  echo"&lt;/br&gt;";
  $query1 = "SELECT country, SUM(profit) FROM `table 1` GROUP BY country"; 
  $result1 = mysql_query($query1) or die(mysql_error());
  
  while($row = mysql_fetch_array($result1)){
      echo "". $row['country']. " = RM ". $row['SUM(profit)'];
      echo "&lt;br /&gt;";
  }
  </code></pre>
  
  <p>My code works but I need to set my Profit to 2 decimal places. Instead of <code>RM 373037194.867713152</code>, i want it to show it as <code>RM 373037194.87</code>.</p>