stonebergftw Posted August 28, 2010 Share Posted August 28, 2010 Say, $ok = 'ABCDEFG' What is the command to check whether $ok contains 'C'? Quote 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. Quote 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. Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/211970-quick-string-question/#findComment-1104774 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.