title: Warning: number_format() expects parameter 1 to be float, string given in D:\xampp\htdocs\website\foodpoint\welcome.php on line 205
body: <p>Im getting this:</p>
  <blockquote>
  <p>Warning: number_format() expects parameter 1 to be float, string given in D:\xampp\htdocs\website\foodpoint\welcome.php on line 205</p>
  </blockquote>
  <p>This is my the code on line 205:</p>
  <pre><code>&lt;?php
  $tot_tapas = number_format($number_of_persons, 2) * number_format($tapas, 2)
  ?&gt;
  
  &lt;?php
  $details = json_decode($obj-&gt;details);
  $tapas = $number_of_persons = '';
  foreach ($details-&gt;items as $item) {
      foreach ($item-&gt;extras as $extra) {
          // new
          $tapas = $item-&gt;service_price;
          $number_of_persons = $item-&gt;number_of_persons;
          // new
          ?&gt;
          &lt;div class=&quot;row&quot;&gt;
              &lt;div class=&quot;col kolom1&quot;&gt;
                  &lt;?php echo $extra-&gt;quantity; ?&gt;x &lt;?php echo $extra-&gt;title; ?&gt;
              &lt;/div&gt;
              &lt;div class=&quot;col kolom2&quot;&gt;
                  P/s : €&lt;?php echo $extra-&gt;price; ?&gt;
              &lt;/div&gt;
              &lt;div class=&quot;col kolom3&quot;&gt;
                  &lt;?php $total = $extra-&gt;quantity * $extra-&gt;price; ?&gt;
                  &lt;?php echo '€' . number_format($total, 2); ?&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;hr&gt;
          &lt;?php
          
      }
  }
  ?&gt;
  </code></pre>