On Thursday 12 August 2004 21:20, Deepak Dhake wrote:
> $query4 = mysql_query("SELECT result FROM TBL_result WHERE survey_no=2";
> while($row2 = mysql_fetch_array($query4)) {
>   //print array
> }
>
> this will print whole array. i just want to print a row at a time and it
> should be in the loop because i am printing other things as well. can you
> tell me how to print a row at a time. actually as i explained earlier, i am
> able to print a row at a time but when it becomes i=1 and starts outer loop
> for the second time it just printing the same values. any suggestion?

The above does what you want. Tell us what happens when you run it. In most 
cases iterating through a recordset using a while-loop is much better than 
using a for-loop.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Hire the morally handicapped.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to