Hello everyone below is given code I want to test string is in English or in Gujarati. But program giving wrong output how can I solve this? If the character is ASCII is from 0A80-0AFF this length then considers as Gujarati else consider as English.
Code:
if (!preg_match('/[^A-Za-z0-9]/', $Query)){
echo 'English';
}
else{
echo 'Gujarati';
}
Input:
A/4
Output:
Gujarati
Expected output:
English