title: money_format() expects parameter 2 to be double
body: <p>I am trying to give the money format 2 variables but I am getting an error message which is this post topic</p>
  
  <p>I did it like </p>
  
  <pre><code>$pricetotal = $price * $each_item['quantity'];
  $cartTotal = $pricetotal + $cartTotal;
  $minicartTotal = $pricetotal + $cartTotal;
  setlocale(LC_MONETARY, "en_GB.UTF-8");
  $pricetotal = money_format("%n", $pricetotal);
  </code></pre>
  
  <p>I am getting the error message on this codes</p>
  
  <pre><code>setlocale(LC_MONETARY, "en_GB.UTF-8");
  $_SESSION ['minicart'] = $minicartTotal = money_format("%n", $cartTotal);
  $cartTotal = money_format("%n", $cartTotal);
  </code></pre>
  
  <p>also u can see <code>$minicartTotal</code> and <code>$cartTotal</code> are both doing the same thing... but they i have done it is that i gave it a different variable number but the contents is the same. </p>
  
  <p>What is the best way of doing this to stop the errors</p>