Home » Php » php – Is there a way to check existence of arabic character like sukum( ۡ ) in a string which primarily comes attached to other characters

php – Is there a way to check existence of arabic character like sukum( ۡ ) in a string which primarily comes attached to other characters

Posted by: admin February 25, 2020 Leave a comment

Questions:

So far I have tried to check existence with string position function after even encoding to utf-8 but fails as following

$a="بِسۡمِ";
$a=mb_convert_encoding($a,"UTF-8","auto");

if (strpos($a, ' ۡ') !== false) {
  echo 'exists';
}
else{
  echo"does not exist"
}

and if possible to replace it with other forms such as ⟨ˆ⟩ or ⟨ʼ⟩
anyone with any idea will be appreciated. I am not an Arabic speaker nor Arabic background.

How to&Answers: