Doing maths in PHP
Posted: Sun Feb 23, 2003 2:59 pm
I know you can download loads of voting polls etc but I wanted to make my own one. just very small but I hit a problem soon as I started.
The first thing I tryed to do was find out 1% off a given total.
I was hoping that it would do 200 dived 100 and it would echo the answer. its not as easy as I hoped.
Any help would me nice. just so I can get this started thanks
The first thing I tryed to do was find out 1% off a given total.
Code: Select all
<?
$total = "200";
$p1 = "$total / 100";
echo "$p1"
?>Any help would me nice. just so I can get this started thanks