Hey:) I have a question. It may sound dumb, but I can't figure out the problem.
What I have:
<html><body>
<?php
$x=5;
$z=6;
$y=$x+$z;
function myTest()
{
global $x, $z, $y;
echo $x . " " . $z . " " . $y . " ";
$x++;
$z++;
}
myTest();
myTest();
echo "<br>";
echo $x . " " . $z . " " . $y;
?>
</body>
</html>
Now my problem is that I don't know why the value of y doesn't change. x and z are changing fine, but y isn't.
Thanks:)
Tim
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.