How do i take account for the pennies in php money?
<p>Ok so i have a variable named </p>

<pre><code>$total_cost
</code></pre>

<p>which is equal to 529700</p>

<p>I need the value to be $5,297.00</p>

<p>this value is coming out of a mysql decimal 10,2 field</p>

<p>I need to now come up with a subtotal of 2% and a shipping of 8.25% based on whether the user is in the state</p>

<p>Lets just assume all the users are from this state, how would i do this via php to preserve the cents </p>

<p>For example this is what i was thinking</p>

<pre><code>$subtotal = $total_cost * 0.02;
$shipping = $total_cost * 0.0825;
$new_total = $total_cost + $shipping + $subtotal;
</code></pre>

<p>but i get $0 when i print this...any ideas why</p>

<pre><code>&lt;?php print "$". $new_total; ?&gt;
</code></pre>
