牛骨文教育服务平台(让学习变的简单)

xn_json_encode()

xn_json_encode($arg)

【功能】

对变量进行 JSON 编码,不对中文进行 UNICODE 转义。

【参数】

$s:字符串

【用例】

<?php

include "./xiunophp/xiunophp.php";

$arr = array ("name"=>"中文");
$s = xn_json_encode($arr);

echo $s;

// 结果: {"name": "中文"}

?>