Reputation: 93
How to search Arabic word contain ( , أ , إ ,ا ) by entering ( ا ) return all data contain ( , أ or إ orا ) in PHP.
For example: search for (اياك نعبد واياك نستعين) return (إياك نعبد وإياك نستعين).
Upvotes: 2
Views: 1309
Reputation: 1674
It's depend on which side you will try to solve the problem ,from Db side or the programming language your are using php & Javascript etc ...
Also which type of data your are searching for fixed format data Like " Hadith with tashkeel or Quran " or data entered by the users and there is no fixed format "احمد" & " أحمد " If you are using php you can You can use this library here it will help you to search in Arabic with all cases of the letter check the example also
IF you want to use the DB side you need to work with MATCH & AGAINST IN BOOLEAN MODE
also you can use regular expressions to solve this problem by adding all letter cases on your query
Upvotes: 1