Jump to content

danthorpe2002

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

danthorpe2002's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks i appreciate youe help but which parts of the code go were??
  2. Ok, i just need the loop to run 5 times, then insert a new column and resume the loop but i don''t know how to do this, i have indicated in the code were i need the loop to resume <td width="130" align="center"> <?php echo mysql_error(); $num = mysql_num_rows($result); $j=5; while ($j < $num) { $title=mysql_result($result, $j, 0); $desc=mysql_result($result, $j, 1); $hasImage=mysql_result($result, $j, 2); ?> <p><a href="play.php?game=<?php echo $title;?>" title="Play <?php echo $title;?> Flash Game"/><?php echo $title;?><br /><img src="preview/<?php echo($hasImage > 0? $title : "missing");?>.gif" alt="Play <?php echo $title;?> Flash Game" width="90" height="90" border="0"/></p> <?php $j++; } ?> <td align="center"> //LOOP SHOULD CONTINUE HERE <?php echo mysql_error(); $num = mysql_num_rows($result); $j=5; while ($j < $num) { $title=mysql_result($result, $j, 0); $desc=mysql_result($result, $j, 1); $hasImage=mysql_result($result, $j, 2); ?> <p><a href="play.php?game=<?php echo $title;?>" title="Play <?php echo $title;?> Flash Game"/><?php echo $title;?><br /><img src="preview/<?php echo($hasImage > 0? $title : "missing");?>.gif" alt="Play <?php echo $title;?> Flash Game" width="90" height="90" border="0"/></p> <?php $j++; } ?> </td> </td>
  3. Hi, i have a loop running and i want to stop it. insert a new column in a table and then resume the loop from were it stopped how can i do thiis?? This is the current code <td width="130" align="center"> <?php echo mysql_error(); $num = mysql_num_rows($result); $j=5; while ($j < $num) { $title=mysql_result($result, $j, 0); $desc=mysql_result($result, $j, 1); $hasImage=mysql_result($result, $j, 2); ?> <p><a href="play.php?game=<?php echo $title;?>" title="Play <?php echo $title;?> Flash Game"/><?php echo $title;?><br /><img src="preview/<?php echo($hasImage > 0? $title : "missing");?>.gif" alt="Play <?php echo $title;?> Flash Game" width="90" height="90" border="0"/></p> <?php $j++; } ?> <td align="center"> <?php echo mysql_error(); $num = mysql_num_rows($result); $j=5; while ($j < $num) { $title=mysql_result($result, $j, 0); $desc=mysql_result($result, $j, 1); $hasImage=mysql_result($result, $j, 2); ?> <p><a href="play.php?game=<?php echo $title;?>" title="Play <?php echo $title;?> Flash Game"/><?php echo $title;?><br /><img src="preview/<?php echo($hasImage > 0? $title : "missing");?>.gif" alt="Play <?php echo $title;?> Flash Game" width="90" height="90" border="0"/></p> <?php $j++; } ?> </td> </td>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.