robcrozier Posted November 23, 2006 Share Posted November 23, 2006 hi, can anyone tell me how i can check if a string contains a certain character using php? I want to be able to raise an error if the string in question does contain this character. Quote Link to comment https://forums.phpfreaks.com/topic/28237-check-if-string-contains-certain-character/ Share on other sites More sharing options...
kenrbnsn Posted November 23, 2006 Share Posted November 23, 2006 Take a look at the function [url=http://www.php.net/stripos]stripos()[/url]Ken Quote Link to comment https://forums.phpfreaks.com/topic/28237-check-if-string-contains-certain-character/#findComment-129124 Share on other sites More sharing options...
robcrozier Posted November 23, 2006 Author Share Posted November 23, 2006 thanks mate, just tried that out and its done the trick! Quote Link to comment https://forums.phpfreaks.com/topic/28237-check-if-string-contains-certain-character/#findComment-129132 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.