Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $quantity = 1000;
- $origPrice = 200;
- $currPrice = 75;
- $diffPrice = $currPrice - origPrice
- $diffPricePercent = (($currPrice - $origPrice) * 100)/$origPrice
- ?>
- <table border="1" cellpadding="5" cellspacing="0">
- <tr>
- <td> Quantity </td>
- <td> Cost Price </td>
- <td> Current Price </td>
- <td> Absolute Change in price </td>
- </tr>
- <tr>
- <td>
- <td><?php echo $quantity ?> </td>
- <td> <?php echo $origPrice ?></td>
- <td> <?php echo $currPrice ?></td>
- <td> <?php echo $diffPrice ?></td>
- <td> <?php echo $diffPricePercent ?> % </td>
- </tr>
- </table>
- </body>
- </html>
Add Comment
Please, Sign In to add comment