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 Link to comment https://forums.phpfreaks.com/topic/113876-problem-with-accessing-data-from-db/ Share on other sites More sharing options...
MasterACE14 Posted July 9, 2008 Share Posted July 9, 2008 the substr(); function maybe? ACE Link to comment https://forums.phpfreaks.com/topic/113876-problem-with-accessing-data-from-db/#findComment-585197 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); ?> Link to comment https://forums.phpfreaks.com/topic/113876-problem-with-accessing-data-from-db/#findComment-585203 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.