PHP Arithmetic Operators

0 votes
347 views
added Mar 27, 2018 in PHP by LC Marshal Captain (25,790 points)
edited Jul 20, 2018 by LC Marshal
//PHP multiplication operators

<div class="transaction-item transaction-price">
<?php
$psf  = "130";
$lot_size  = "14200";
$total_price = $lot_size * $psf; 
?>

<?php print $total_price; ?>  
</div>

2 Responses

0 votes
responded Mar 27, 2018 by LC Marshal Captain (25,790 points)
edited Jul 20, 2018 by LC Marshal
<?php
  $lot_size  = $row['area_sqft'];
  $psf  = $row['unit_price_psf'];

  $total_price = $lot_size * $psf; 
?>
<?php print $total_price; ?> 
0 votes
responded Jul 20, 2018 by LC Marshal Captain (25,790 points)
// To find what percentage of certain amount from total amount

<?php
    $percent_own = $paidAmt / $topay * 100;
?>
lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...