PDA

View Full Version : [SOLVED] Php code correction required!



Rytron
May 20th, 2008, 09:31 PM
Hi,

For this

<?php
$num1 = 29+21;
$num2 = 70;
echo $num1+num2;
?>
I get output

50

but I should get

120

as output. Does anyone know what is wrong?

Thanks.

deuce868
May 20th, 2008, 09:33 PM
Hi,

For this
code

<?php
$num1 = 29+21;
$num2 = 70;
echo $num1+num2;
?>
I get output

50

but I should get

120

as output. Does anyone know what is wrong?

Thanks.

missing a $ on num2 there.