I want to check for string that contains only english alphabets , digits and symbols.I tried below code but it works only when all the characters are different language.
if(strlen($string) != mb_strlen($string, 'utf-8'))
{
echo "No English words ";
}
else {
echo "only english words";
}
For example
1. hellow hi 123#!@#!@#()#@# -- true
2. ព្រាប សុវ ok yes #@# - false
3. this is good 123 - true
4. ព្រាប -- false
p.s : my question is not duplicate because other questions only cover alphabets and symbols , mine covers symbol too