edwardtilbury Posted April 8, 2009 Share Posted April 8, 2009 I'm trying to remember how to chop off everything that is over 70 characters in a variable... I'm trying to make my xml file compatible with google base.. and my descriptions cannot be over 70 characters.. there's a function that does this.. I just can't remember what is it.. I know in visual basic It's something like that. Thanks! (I'm a php noob, so forgive me if this is totally obvious, I looked, I didn't see it, or a clear example of how to accomplish this.) Link to comment https://forums.phpfreaks.com/topic/153234-solved-chop-off-everything-70-characters-from-string-rtrim-forgot-function-noob/ Share on other sites More sharing options...
edwardtilbury Posted April 8, 2009 Author Share Posted April 8, 2009 I solved my own question... Here it is.. substr($description, 0, 70); See example #3 http://us3.php.net/manual/en/function.substr.php Link to comment https://forums.phpfreaks.com/topic/153234-solved-chop-off-everything-70-characters-from-string-rtrim-forgot-function-noob/#findComment-804979 Share on other sites More sharing options...
Maq Posted April 9, 2009 Share Posted April 9, 2009 Excellent, please mark as [sOLVED] so people know. Thanks! Link to comment https://forums.phpfreaks.com/topic/153234-solved-chop-off-everything-70-characters-from-string-rtrim-forgot-function-noob/#findComment-805075 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.