I'm trying to get the html entities of a UTF-8 string,
Example: example.com/search?q=مرحبا
<?php
echo htmlentities($_GET['q']);
?>
I got:
Ù…Ø±ØØ¨Ø§0Ù…Ø±ØØ¨Ø§
It's UTF-8 text not html entities, what I need is:
مرحبا
I have tried urldecode
and htmlentities
functions!