tawevolution Posted November 1, 2006 Share Posted November 1, 2006 Hey. How do I show only say 50 characters from a database field which contains in excess of 2,000? So like a little preview? I have seen it done, but dont know how to do it myself!Any Ideas? Link to comment https://forums.phpfreaks.com/topic/25840-limiting-characters-from-a-database/ Share on other sites More sharing options...
Orio Posted November 1, 2006 Share Posted November 1, 2006 You might be intrested in the wonderful little function called [url=http://www.php.net/substr]substr()[/url].Orio. Link to comment https://forums.phpfreaks.com/topic/25840-limiting-characters-from-a-database/#findComment-117983 Share on other sites More sharing options...
obsidian Posted November 1, 2006 Share Posted November 1, 2006 Another thought which works quite well is to actually complete the entire word beyond your character limit. This allows a user to see the end of the word instead of breaking it with something like "Because of our l..." You would see something like "Because of our limit..." instead. Link to comment https://forums.phpfreaks.com/topic/25840-limiting-characters-from-a-database/#findComment-117995 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.