For Loops and Variables??

From: Date: Sat, 13 Sep 2003 16:25:32 +0000
Subject: For Loops and Variables??
Groups: php.general 
Request: Send a blank email to php-general+get-162499@lists.php.net to get a copy of this message
When I use for loops, at the start of each iteration, the variables hold the values from the last loop. First, is there an elegant way of clearing variables at the start of each loop rather than using unset???! It just seems wrong. Also, all my problems would be solved if variables in a for loop were kept local, but everything by default is a global. Can I change this in php.ini or something?? TIA

« previous php.general (#162499) next »