Re: $i vs. $r

From: Date: Mon, 27 Mar 2006 23:11:49 +0000
Subject: Re: $i vs. $r
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-232681@lists.php.net to get a copy of this message
Kevin Murphy wrote:
Does anyone have a clue why using this code doesn't work:
Please specify what "doesn't work" means in this case :)
$i = 0; while ($row = mysql_fetch_array($result))
    {           echo ("Blah blah blah");
        $i++;
    }
$r = 0; while ($row = mysql_fetch_array($result))
    {           echo ("Blah blah blah");
        $r++;
    }
Those two blocks of code are for all intents and purposes identical, and indeed probably end up as exactly the same opcodes. Jasper

« previous php.general (#232681) next »