that's what I tried and ended with question marks like the snapshot above , I don't know how to get rid of these question marks and get the correct arabic charset instead , anyone help
if (is_dir($dir)){
if ($dh = opendir($dir)){
while (($file = readdir($dh)) !== false){
if ($file != "." && $file != "..") {
$file_utf8 = iconv( "CP1256", "UTF-8", $file );
echo $file_utf8 . "<br>";
}
}
closedir($dh);
}