ryanwood4 Posted November 11, 2012 Share Posted November 11, 2012 Hi, I can't figure out how to limit the word count fetched from the database. I simply want to show 10 words from the 'body' column. I'm using the below echo code to display the information. echo '<div class="menu"><div class="item">'; echo '<h1><a href="news/display/'.$row['id'].'">'.$row['title'].'</a></h1>'; echo '<img src="../'.$row['image'].'"/>'; echo '<p>'.$row['body'].'</p>'; echo '</div></div>'; Any help is appreciated. Thanks. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.