Undoubtedly0 Posted July 28, 2009 Share Posted July 28, 2009 How can the following string, mystr, be trimmed so that only the first colon (:) is removed: $mystr = ":hello:world:"; The result of the new string would be "hello:world:". Link to comment https://forums.phpfreaks.com/topic/167869-solved-extremely-simple-php-string-question/ Share on other sites More sharing options...
fooDigi Posted July 28, 2009 Share Posted July 28, 2009 $mystr = ":hello:world:"; echo ltrim($mystr,':'); Link to comment https://forums.phpfreaks.com/topic/167869-solved-extremely-simple-php-string-question/#findComment-885374 Share on other sites More sharing options...
Undoubtedly0 Posted July 28, 2009 Author Share Posted July 28, 2009 Thank you! Link to comment https://forums.phpfreaks.com/topic/167869-solved-extremely-simple-php-string-question/#findComment-885380 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.