I've got a list of numbers in Turkish (?) that I need to get translated into English. A simple str_replace won't work, I'm assuming php just doesn't recognize character set and ignores the matches.
This simple little script below attempts to do the translation for me but has no success. I left the iconv() in the code (but commented out) because that was my first thought, but didn't work.
Any help would be appreciated.
Ooh yea, can we get a little color change on the php coding here. That blue is tough to read ... yellow would do nicely
This simple little script below attempts to do the translation for me but has no success. I left the iconv() in the code (but commented out) because that was my first thought, but didn't work.
PHP:
$number= '١٫٩٦' ;
// $number= iconv( "ISO-8859-9", "UTF-8", $number);
$number= str_replace('٠','0',$number) ;
$number= str_replace('١','1',$number) ;
$number= str_replace('٢','2',$number) ;
$number= str_replace('٤','4',$number) ;
$number= str_replace('٥','5',$number) ;
$number= str_replace('٦','6',$number) ;
$number= str_replace('٧','7',$number) ;
$number= str_replace('٨','8',$number) ;
$number= str_replace('٩','9',$number) ;
echo $number ;
Ooh yea, can we get a little color change on the php coding here. That blue is tough to read ... yellow would do nicely