
Murshed A. answered 11/14/15
Tutor
5
(11)
Experienced Engineering tutor who gets results!
How do you declare a variable and store something in it?
$amount = 100;
Now you need to perform a calculation on this initial amount. In PHP you can use variables in your calculations and store those values in other variables. Here I store the calculation in a variable called $zakat.
$zakat = ($amount * 2.5) / 100;
That's all there is to it.
If you are learning from a book or online tutorial, I recommend reading the text first to get an idea of how variables work.