dprichard Posted July 24, 2007 Share Posted July 24, 2007 Okay, I am trying to convert from using Dreamweaver PHP to hand coding stuff and am having problems with this. I am trying to repeat this line of code for just the first 3 records. <?php do { ?><p><?php echo $row_newsinfo['newstitle']; ?></p> <p><?php echo $row_newsinfo['newsbody']; ?></p> <p><a href="insurance-employee-benefit-news.php?newsid=<?php echo $row_newsinfo['newsid']; ?>">Read the full story >></a></p><br> <p><img src="../images/hr_small_right.jpg" width="239" height="3"></p><br><?php } while ($row_newsinfo <= 3) ?> Link to comment https://forums.phpfreaks.com/topic/61595-repeat-region-php/ Share on other sites More sharing options...
GingerRobot Posted July 24, 2007 Share Posted July 24, 2007 If you are only wanting the first 3 records, add a LIMIT 3 clause to your mysql query. Link to comment https://forums.phpfreaks.com/topic/61595-repeat-region-php/#findComment-306583 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.