PHP开发实例大全(提高卷) 中文完整pdf扫描版[244MB]
数组替换
$langs = array("EN" => "English",
"ZH" => "Chinese",
"DA" => "Danish",
"NL" => "Dutch",
"FI" => "Finnish",
"FR" => "French",
"DE" => "German");
$json = str_replace(array('"EN":','"ZH":'),array( '"en":', '"zh":'), json_encode($langs));
print_r(json_decode($json, true));
转载请注明:谷谷点程序 » php数组替换的方法