$num = 10; function multiply() { $num = $num * 10; } multiply(); echo $num;
This prints "10" to the screen.
$num = $num * 10; echo $num;
But this prints "0".
Why is that?
no subject
Date: 2008-06-23 02:53 pm (UTC)From:The problem remains, though - if $x * 2 = 0 (where x is not set), then why is the function returning a number instead of 0?
no subject
Date: 2008-06-23 04:57 pm (UTC)From: