Guardian-Mage Posted May 4, 2007 Share Posted May 4, 2007 I have a PHP script that grabs a string out of a database. I need to echo the first 13 letters of that string. How can i do that ex: We just released the Jordan Wilkens 2 Trailer on Youtube. Go ahead and check it out. The movie stars Jordan Wilkens as Jordan Wilkens. Please vote for the new movie. result: We just relea... I know how to add the ... to the end, just not how to get the first part of the string. Thanks Link to comment https://forums.phpfreaks.com/topic/50064-solved-manipulating-strings/ Share on other sites More sharing options...
pocobueno1388 Posted May 4, 2007 Share Posted May 4, 2007 $string = "We just released the Jordan Wilkens 2 Trailer on Youtube."; $string = substr($string, 0, 13); echo $string . "..."; Link to comment https://forums.phpfreaks.com/topic/50064-solved-manipulating-strings/#findComment-245722 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.