<?php
$User = array(
'Name' => "Hans-Peterµµ",
'Contacts' => array(1, 2, 3, 4, 5, 6, 7, 42),
'Active' => 1
);
$J = html_entity_decode(json_encode(array_utf8_encode($User)));
echo $J;
function array_utf8_encode($Array)
{
foreach($Array as &$Val)
{
if(is_array($Val))
{
$Val = array_utf8_encode($Val);
}
elseif(is_string($Val))
{
$Val = mb_convert_encoding(htmlentities($Val), 'UTF-8'); }
}
return $Array;
}
preferences:
46.46 ms | 402 KiB | 5 Q