PHP - wrong order of array elements in case of hebrew letters

Viewed 124

That is my example code:

$string = '"5","תמר","0","N"';
var_dump(explode(',',$string));

That is the result:

array(4) {
  [0]=>
  string(3) ""5""
  [1]=>
  string(8) ""תמר""
  [2]=>
  string(3) ""0""
  [3]=>
  string(3) ""N""
}

The order of elements is wrong. 3rd element is second. I understand that Hebrew is a language that we read RTL and it is the reason for switched order. How can I have got a proper order of elements, LTR for all of them?

0 Answers
Related