Re: [PHP] $i vs. $r --> coding style ....

2006-03-28 Thread Jochem Maas
Philip Hallstrom wrote: I simplified the code a bit, and I am guessing that it was too much. Below is the complete code that works fine. The weird part is, the part that I have the question on, is if I change $r to $i, it doesn't work anymore. $i doesn't count up as it should and instead give

Re: [PHP] $i vs. $r

2006-03-27 Thread Philip Hallstrom
I simplified the code a bit, and I am guessing that it was too much. Below is the complete code that works fine. The weird part is, the part that I have the question on, is if I change $r to $i, it doesn't work anymore. $i doesn't count up as it should and instead gives me some unpredictible res

Re: [PHP] $i vs. $r

2006-03-27 Thread Kevin Murphy
Hello all I simplified the code a bit, and I am guessing that it was too much. Below is the complete code that works fine. The weird part is, the part that I have the question on, is if I change $r to $i, it doesn't work anymore. $i doesn't count up as it should and instead gives me s

Re: [PHP] $i vs. $r

2006-03-27 Thread Jasper Bryant-Greene
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_arra

RE: [PHP] $i vs. $r

2006-03-27 Thread Jay Blanchard
[snip] Does anyone have a clue why using this code doesn't work: $i = 0; while ($row = mysql_fetch_array($result)) { echo ("Blah blah blah"); $i++; } but this code does? $r = 0; while ($row = mysql_fetch_array($result)) {

Re: [PHP] $i vs. $r

2006-03-27 Thread Anthony Ettinger
On 3/27/06, Kevin Murphy <[EMAIL PROTECTED]> wrote: > Does anyone have a clue why using this code doesn't work: > > $i = 0; > > while ($row = mysql_fetch_array($result)) > > { > echo ("Blah blah blah"); > $i++; > } > > but this code does? > > $r = 0;