Math with php
| From: | Frank Keessen | Date: | Tue, 10 Jun 2003 21:22:53 +0000 |
| Subject: | Math with php | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-150969@lists.php.net to get a copy of this message | ||
Hi,
Hope you can help me:
How can i do the following in PHP:
When a variable is for example:
$a = 7
I must do the following 6 * X and 1 * Y, but when $a = 4 it must only do 4 * X.
So every when the value is odd i must do # * X and # * Y..
Some examples or hints are very welcome! Sory that this is maybe a little bit vague... Questions?
e-mail!
Regards,
Frank