graham23s Posted December 27, 2009 Share Posted December 27, 2009 Hi Guys, When coding in vb.net i can use: if (html.Contains("string i'm searching for") then... its a really fast way to see if the html string contains some text, i was wondering if there was anything similar for php? cheers for any info guys Graham Link to comment https://forums.phpfreaks.com/topic/186436-check-string-contains-x/ Share on other sites More sharing options...
rajivgonsalves Posted December 27, 2009 Share Posted December 27, 2009 there are quite a few functions in php for that one, you can use strpos http://www.php.net/manual/en/function.strpos.php Link to comment https://forums.phpfreaks.com/topic/186436-check-string-contains-x/#findComment-984524 Share on other sites More sharing options...
cags Posted December 27, 2009 Share Posted December 27, 2009 How about stristr, strstr or strpos? Edit: Beaten to the punch. Link to comment https://forums.phpfreaks.com/topic/186436-check-string-contains-x/#findComment-984525 Share on other sites More sharing options...
graham23s Posted December 27, 2009 Author Share Posted December 27, 2009 ahh thanks guys, all of them would do perfect Graham Link to comment https://forums.phpfreaks.com/topic/186436-check-string-contains-x/#findComment-984527 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.