/ / Converti array PHP in stringa Json [duplicato] - php, json

Convertire l'array PHP in Json String [duplicate] - php, json

Mi chiedo solo se è possibile convertire un array PHP in una stringa JSON Ecco il seguente array PHP:

array (
"players" => array (
"123" => "345"
"567" => "789"
),
"non_players" => array (
0 => "71558060",
1 => "14451395",
2 => "16428783",
3 => "12070702",
4 => "16872249",
5 => "10081837",
6 => "10000363",
7 => "10084478",
),
)

È possibile convertire in stringa JSON?

risposte:

0 per risposta № 1

Potresti semplicemente usarlo json_encode(), dal manuale PHP: http://www.php.net/manual/en/function.json-encode.php