json_encode() wont work for me when I\'m using åäö. Why? And how can I get it to work?
json_encode()
The php:
php
echo json_encode($arr);
As of PHP 5.4.0:
Convert your strings in your array to into utf-8 using utf8_encode($str) function.
utf-8
utf8_encode($str)
Then json_encode with JSON_UNESCAPED_UNICODE option:
json_encode
$arr = json_encode($array, JSON_UNESCAPED_UNICODE);