Yeah I understand that and it would be perfect if I only had to call this type of function once on a page... and on any other pages that need something like this I will do it that way but with the counter set to 0 or whatever number I choose which is a sort of view all page so your solutions works better for this page. Thanks again.
Jas


Chris W. Parker wrote:

Jas <mailto:[EMAIL PROTECTED]>
    on Thursday, December 11, 2003 7:21 AM said:


Well just so you understand "why" I needed something like that here is
the finished result below


[snip]


$i = 0;
while(list(...) = mysql_fetch_row(...)) {
   $_SESSION[$i] = "...";
   $i++;
}


I want to change my suggestion and recommend that you go along with what
John Holmes suggested a little after my post. Read his post again and
see if it is helpful to you. Keep note of the following aspect:

You can remove the $i = 0; and the $i++; by changing $_SESSION[$i] =
"..."; to $_SESSION[] = "...";.

i.e. The following two code blocks perform the same task:

Current:
$i = 0;
while(list(...) = mysql_fetch_row(...)) {
    $_SESSION[$i] = "...";
    $i++;
}

New:
while(list(...) = mysql_fetch_row(...)) {
    $_SESSION[] = "...";
}



Chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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



Reply via email to