bradgrafelman wrote:How is PHP supposed to know what's English and what's not?
(...)
Now, explain in detailed logical steps how you can determine if those sentences are in English or not.
You might want to take a course on natural language processing so you can find out possible answers to your question 🙂
scialom wrote:sorry my mistake - didn't explain it right...
I mean English chars.
I want to check if the string is in Hebrew chars or Latin (A-Z
That is still not very clear. Do you want to check if the sentence contains letters of a certain alphabet? Do you want to check if (presumably after stripping punctuation and whitespace, and maybe ignoring numerals) the entire sentence only consists of letters of a certain alphabet?