PDA

View Full Version : Calculating in PHP (adding subtracting etc)


Richard
01-16-2003, 11:50 PM
How do you do calculations with php ? I have the number of lines in a file as an array ($blah), and want to make a new array ($wteva) which is the result of subtracting 10 from $blah

I tried searching for a 'calc' function but doesn't exist.

Spookster
01-16-2003, 11:57 PM
http://www.php.net/manual/en/language.operators.arithmetic.php