TecTao Posted November 22, 2007 Share Posted November 22, 2007 I want to loop through a table of current news articles. On a page I want to trim the articles down to display only the first say 200 characters. Also I want to have it loop through and display only the 5 most recent entries. Any help on the query Thanks in advance m Link to comment https://forums.phpfreaks.com/topic/78420-trim-and-loop-limit-question/ Share on other sites More sharing options...
revraz Posted November 22, 2007 Share Posted November 22, 2007 Post what you have so far. Link to comment https://forums.phpfreaks.com/topic/78420-trim-and-loop-limit-question/#findComment-396844 Share on other sites More sharing options...
TecTao Posted November 22, 2007 Author Share Posted November 22, 2007 Here's the beginning code: <? $results = mysql_query("SELECT * FROM current_news ORDER BY n_date"); while ($row = mysql_fetch_array($results)) { extract($row); echo $n_news; $row_count++; } mysql_close; ?> Link to comment https://forums.phpfreaks.com/topic/78420-trim-and-loop-limit-question/#findComment-396850 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.