Jump to content

timjahn

Members
  • Posts

    4
  • Joined

  • Last visited

timjahn's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I changed it to that..: <html> <body> <?php $x=5; $z=6; $y=$x+$z; function myTest() { global $x, $z, $y; echo $x . " " . $z . " " . $y . " "; $x++; $z++; $y=$x+$z; } myTest(); myTest(); echo "<br>"; echo $x . " " . $z . " " . $y; ?> </body> </html> ..and it is working:) thank you so much;) Thanks to you too, psycho
  2. 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
×
×
  • Create New...

Important Information

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.