Ok i got a stupid little problem.
I need to calculate a variable from a sql query.
I can echo a variable from the query and it shows for example 22, but i need to multiply it.
So i got:
Code:
$old = $query[nValue];
echo $old;
it works it shows 20
Code:
$old = $query[nValue];
$percent = 2;
$multip = $old * $percent;
echo $multip;
it doens't work and shows 0.
Or:
Code:
$multip = $query[nValue] * 2;
echo $multip;
This shows 2??, so please some php guru can explain me why this doesn't work?
Last edited by TheSir; 01-14-2011 at 11:42 AM..
|