I am looking for any resources that would help me with mathematics in PHP. Be it a good book, website or anything.
Here is what I have to accomplish:
Purchase Database
Index page displays: Account Code, Account Name, Budget and Amount Remaining
Every time somone adds a purchase it will subtract from the budget in that account and display the remaining amount of monies in that account.
Many thanks for your assistance!
Math in php
Moderator: General Moderators
uhhh... if all you need is subtraction, use the subtraction operator
Code: Select all
$acount = $acount - $purchase_amount;-
SidewinderX
- Forum Contributor
- Posts: 407
- Joined: Fri Jul 16, 2004 9:04 pm
- Location: NY
aside from the basic operators
http://us2.php.net/manual/en/ref.math.php
here is a list of other common mathamatical functionsAdd: +
Subtract: -
Divide: /
Multiple: *
http://us2.php.net/manual/en/ref.math.php
- christian_phpbeginner
- Forum Contributor
- Posts: 136
- Joined: Sat Jun 03, 2006 2:43 pm
- Location: Java
Re: Math in php
http://www.php.net/manual/en/language.expressions.phpEiolon wrote:I am looking for any resources that would help me with mathematics in PHP. Be it a good book, website or anything.
http://www.php.net/manual/en/language.operators.phpEiolon wrote: Here is what I have to accomplish:
Purchase Database
Index page displays: Account Code, Account Name, Budget and Amount Remaining
Every time somone adds a purchase it will subtract from the budget in that account and display the remaining amount of monies in that account.
http://www.php.net/manual/en/language.c ... ctures.php