ramesh_iridium Posted July 9, 2008 Share Posted July 9, 2008 Hi i have a problem while accessing db results. My requirement is i have to access a field contains 10 lines of text ,but i have to display only 4 lines of text in my front-end . Please suggest me your valuable decisions. Thanks Ramesh Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted July 9, 2008 Share Posted July 9, 2008 the substr(); function maybe? ACE Quote Link to comment Share on other sites More sharing options...
john-formby Posted July 9, 2008 Share Posted July 9, 2008 Can you use something like: <?php $sql = mysql_query("SELECT field FROM tblblah"); $row = mysql_fetch_array($sql); echo substr($row['field'],0,400); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.