SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: Nested While Loops
-
May 16, 2001, 23:59 #1
- Join Date
- Mar 2001
- Location
- London
- Posts
- 160
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Any idea why this code doesn't work??
The last 2 printf statements dont execute and also where $list is increased by 1.
$list="0";
$c2= $list + "10";
if (!($link=mysql_connect($hostname, $username, $password))) {
printf ("Canna Connect");
}
$ans = mysql_db_query("wordlist", "SELECT * from words");
$c1=$list;
$limit=mysql_num_rows($ans);
while ($list < $c2) {
printf ("<table align='center' width='500'>");
while ($c1 < $limit) {
printf ("<tr><td width='150' bgcolor='#FFCC33'>");
printf(mysql_result($ans, $c1, 1));
printf ("</td><td width='350' bgcolor='#FFCC99'>");
printf(mysql_result($ans, $c1, 2));
printf ("</tr>");
$c1 += 100;
}
printf ("</table>");
printf ("<br>");
$list = $list + 1;
}
Thanx
-
May 17, 2001, 00:16 #2
- Join Date
- Mar 2001
- Location
- London
- Posts
- 160
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Forget it
Forget the above post.....
I just figured it out
what a *duh* i am!
Bookmarks