$a = \'how are you\'; if (strpos($a,\'are\') !== false) { echo \'true\'; }
In PHP, we can use the code above to check if a string contain speci
You might wanna use include method in JS.
var sentence = "This is my line"; console.log(sentence.includes("my")); //returns true if substring is present.
PS: includes is case sensitive.