I'am looking for a syntax that will do the following:
if('String' not in $string){
//do this
}
I am also looking for away to say
if('String' in $string){
//do this
}
Can anyone help, I have googled for solutions and they seem very confusing.
Thanks, J
I always use this:
if (stristr($string, "string")) {
//String exists within $string
}else{
//String does not exist
}
http://www.php.net/stristr
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With