johnsmith153 Posted September 28, 2008 Share Posted September 28, 2008 Very simple, I have a string. "giui: huihui" I want to remove the : and anything before it. To output "huihui" Link to comment https://forums.phpfreaks.com/topic/126131-remove-anything-in-string-before-a-certain-character/ Share on other sites More sharing options...
corbin Posted September 28, 2008 Share Posted September 28, 2008 <?php $str = 'blah: bleh'; echo substr($str, str_pos($str, ':')); You may want to look at str_pos to make sure : is in the string before assuming it is, by the way. Link to comment https://forums.phpfreaks.com/topic/126131-remove-anything-in-string-before-a-certain-character/#findComment-652201 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.