AbydosGater Posted October 15, 2007 Share Posted October 15, 2007 Hey guys, Sorry for the silly question.. Been awhile.. If i have one string .. how do i go about searching it to see if it contains another string? Thanks, Andy Link to comment https://forums.phpfreaks.com/topic/73361-finding-a-string-inside-another/ Share on other sites More sharing options...
wildteen88 Posted October 15, 2007 Share Posted October 15, 2007 use substr prehaps? or preg_match for more search power Link to comment https://forums.phpfreaks.com/topic/73361-finding-a-string-inside-another/#findComment-370129 Share on other sites More sharing options...
darkfreaks Posted October 15, 2007 Share Posted October 15, 2007 substr would just return part of the string if you want to search a string for another string you might want to combine strpos and substr. Link to comment https://forums.phpfreaks.com/topic/73361-finding-a-string-inside-another/#findComment-370130 Share on other sites More sharing options...
kenrbnsn Posted October 15, 2007 Share Posted October 15, 2007 I would use either strpos() or strstr() Ken Link to comment https://forums.phpfreaks.com/topic/73361-finding-a-string-inside-another/#findComment-370134 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.