I have a string like this:
$str = "Hello आप कैसे हैं?";
I want to check whether the string contains Hindi or english language characters
I tried out this code:
if (preg_match('/[^A-Za-z]/', $str)){
//string contains hindi or english characters only
}
else{
//string contains some other foreign language characters
}
But this checks only for english characters, how do I check for hindi characters as well?