I know there are a lot of questions already posted with arabic language in php, but I was unable to get solution to my problem and hence I am posting this question:
I have a PhP site that is running perfectly in English language. Now, I want it to support multiple languages including French, Spanish, Arabic but I am unable to use them with one code. The problem is, I have used substr() in many places and the translated characters not work as intended with substr(). I also tried with mb_substsr(), but of no use :(
The field in DB is "utf8_general_ci" and I have already placed header('Content-type: text/html; charset=UTF-8'); in my code to allow rendering in UTF-8.
The problem is either I get "?????" in place of the exact words or I get incorrect words with substr()
Please help!!