Re: [PHP] loop weirdness

2008-08-19 Thread clive
I presume you mean you see all the print_r's for each row and that you only see one row echo'd out in your html? You have your brackets in the wrong place, it should be something like this: if ($f_date != "") { while($row = ifx_fetch_row($info)) { //set your variables //echo out

Re: [PHP] loop weirdness

2008-08-19 Thread clive
I presume you mean you see all the print_r's for each row and that you only see one row echo'd out in your html? You have your brackets in the wrong place, it should be something like this: if ($f_date != "") { while($row = ifx_fetch_row($info)) { //set your variables //echo

Re: [PHP] loop weirdness

2008-08-19 Thread Stut
On 19 Aug 2008, at 16:21, Dan Shirah wrote: Perhaps I'm not understanding correctly, but you can still use the while loop if only a single row is returned, it'll just run the loop once. -Stut That's what I thought also and is how I had it setup at first! But for some strange reason it a

Re: [PHP] loop weirdness

2008-08-19 Thread Dan Shirah
> Perhaps I'm not understanding correctly, but you can still use the while > loop if only a single row is returned, it'll just run the loop once. > > -Stut > That's what I thought also and is how I had it setup at first! But for some strange reason it always returned 4 identical results instead

Re: [PHP] loop weirdness

2008-08-19 Thread Stut
On 19 Aug 2008, at 16:10, Dan Shirah wrote: Your comments indicate you're trying to end the if in the middle of the while, but what PHP will be doing is ending the while where you want to end the if. I assume what you actually want to do is end both after the HTML is output, but I'm just gue

Re: [PHP] loop weirdness

2008-08-19 Thread Dan Shirah
> > Your comments indicate you're trying to end the if in the middle of the >> while, but what PHP will be doing is ending the while where you want to end >> the if. I assume what you actually want to do is end both after the HTML is >> output, but I'm just guessing. >> >> -Stut > > Depending on s

Re: [PHP] loop weirdness

2008-08-19 Thread Stut
On 19 Aug 2008, at 15:58, Dan Shirah wrote: I'm having some weirdness with a loop. I am adding an conditional statement to my script to see if a condition is met before running a loop. All of the code up to this point works great so I have not included it since it is very long and extensive

[PHP] loop weirdness

2008-08-19 Thread Dan Shirah
Hello all! I'm having some weirdness with a loop. I am adding an conditional statement to my script to see if a condition is met before running a loop. All of the code up to this point works great so I have not included it since it is very long and extensive. Basically I have a query that runs a