stonebergftw Posted August 28, 2010 Share Posted August 28, 2010 Say, $ok = 'ABCDEFG' What is the command to check whether $ok contains 'C'? Link to comment https://forums.phpfreaks.com/topic/211970-quick-string-question/ Share on other sites More sharing options...
PaulRyan Posted August 28, 2010 Share Posted August 28, 2010 Hello stonebergftw. The following code should be useful to you if(strstr($ok, 'C')) { echo 'Contains C'; } else { echo 'Does not contain C'; } If you still need help, post back here Thanks, Paul. Link to comment https://forums.phpfreaks.com/topic/211970-quick-string-question/#findComment-1104678 Share on other sites More sharing options...
stonebergftw Posted August 29, 2010 Author Share Posted August 29, 2010 Thanks a ton friend. Link to comment https://forums.phpfreaks.com/topic/211970-quick-string-question/#findComment-1104766 Share on other sites More sharing options...
PaulRyan Posted August 29, 2010 Share Posted August 29, 2010 Not a problem Link to comment https://forums.phpfreaks.com/topic/211970-quick-string-question/#findComment-1104774 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.