title: PHP String to Float
body: <p>I am not familiar with PHP at all and had a quick question.</p>
  
  <p>I have 2 variables <code>pricePerUnit</code> and <code>InvoicedUnits</code>. Here's the code that is setting these to values:</p>
  
  <pre><code>$InvoicedUnits = ((string) $InvoiceLineItem-&gt;InvoicedUnits);
  $pricePerUnit = ((string) $InvoiceLineItem-&gt;PricePerUnit);
  </code></pre>
  
  <p>If I output this, I get the correct values. Lets say <code>5000</code> invoiced units and <code>1.00</code> for price.</p>
  
  <p>Now, I need to show the total amount spent. When I multiply these two together it doesn't work (as expected, these are strings).</p>
  
  <p>But I have no clue how to parse/cast/convert variables in PHP.</p>
  
  <p>What should I do?</p>