📜  php json 编码 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:03.126000             🧑  作者: Mango

代码示例4
$function = "#!!function(){}!!#"; 
$message = "Hello";

$json = array(   
  'message' => $message,
  'func' => $function
);
$string = json_encode($json);
$string = str_replace('"#!!','',$string);
$string = str_replace('!!#"','',$string);
echo $string;