I have string in PHP "S*+%2YKΠ3)3Π+)+Θ" that I want to iterate.
my code :
$string = "S*+%2YKΠ3)3Π+)+Θ";
$charLength = mb_strlen($string);
for($i = 0 ; $i < $charLength ; $i++) {
$char = mb_substr($string, $i , 1);
if($char == 'Π') {
echo "this is my Π character";
}
}
But I never entering the echo statement to get "this is my Π character",
Anyone to help me with this problem, please ... I already looking for others answer like:
How to convert any character encoding to UTF8 on PHP
Convert utf8-characters to iso-88591 and back in PHP
PHP: Convert any string to UTF-8 without knowing the original character set, or at least try
How to convert a string to utf-8 code in php
but never work for my case. Thank you