calculation

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ben_albrechts
Forum Commoner
Posts: 33
Joined: Wed Oct 26, 2005 3:33 am

calculation

Post by ben_albrechts »

I have to add this part to my code to do the next calculation : 1,5+((A-1)x0,5) where A is a number the visitor enters in a form
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Good for you.

*snip*

A slightly more helpful response:

Code: Select all

$result = 1.5 + (($A - 1) * 0.5);
ben_albrechts
Forum Commoner
Posts: 33
Joined: Wed Oct 26, 2005 3:33 am

Post by ben_albrechts »

thank you
Post Reply