str_replace('99552', '', $json->path)});我这样写提示Parse error: syntax e">
时间:2021-07-01 10:21:17 帮助过:19人阅读
$arr = array(
foreach ($list->list as $json) {
"file"=>str_replace('99552', '', $json->path)
}
);
我这样写提示Parse error: syntax error, unexpected T_FOREACH, expecting ')',该如何修改?
$arr = array(
foreach ($list->list as $json) {
"file"=>str_replace('99552', '', $json->path)
}
);
我这样写提示Parse error: syntax error, unexpected T_FOREACH, expecting ')',该如何修改?
$arr = array();
foreach ($list->list as $json)
{
$arr[] = array(
"file"=>str_replace('99552', '', $json->path);
);
}
$arr = array();
foreach ($list->list as $json)
{
$arr[] = str_replace('99552', '', $json->path);
}
var_dump($arr);
即可。
新手路过学习一下,感谢bio.soyiyuan.com