Jump to content

Archived

This topic is now archived and is closed to further replies.

Eiolon

Math in php

Recommended Posts

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!

Share this post


Link to post
Share on other sites
dear friend,
[quote]Here is what I have to accomplish:

Purchase Database

Index page displays: Account Code, Account Name, Budget and Amount Remaining[/quote]
i suppose that the above quoted statements refer to the project you are handling and the problem you are facing is as under:
[quote]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.[/quote]
this is simple. suppose that $cost is the cost of item purchased and $budget is the amount the visitor has. $remainingamount being the.... oh u can understand.
then
$remainingamount = $budget - $cost;
simple
:)
if you want to ask for the process that you have to apply to your database then you can ask. otherwise your present question has been answered. i hope....

Share this post


Link to post
Share on other sites
See here:

http://www.php.net/math

and here:

http://us3.php.net/manual/en/language.operators.arithmetic.php

Share this post


Link to post
Share on other sites
friend,
i hope your problem has been solved. yet if you encounter any problem you can reply to this msg of mine. thankyou.
one more thing. your subject said that you were looking for a maths problem and being a mathematics student i took it wrong and thought if you were looking for something related to algebra, geometry or calculus etc.
anyways, keep working good on your project.

Share this post


Link to post
Share on other sites
[quote author=raza.shahzad link=topic=103945.msg414345#msg414345 date=1155348168]
friend,
i hope your problem has been solved. yet if you encounter any problem you can reply to this msg of mine. thankyou.
one more thing. your subject said that you were looking for a maths problem and being a mathematics student i took it wrong and thought if you were looking for something related to algebra, geometry or calculus etc.
anyways, keep working good on your project.
[/quote]

I haven't been able to try it out because everything is at work.  I didn't expect to get answers so soon so I thought I'd post it tonight and come back to it tomorrow.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.