我使用一个库将本地 WebSQL DB 同步到服务器,特别是https://github.com/orbitaloop/WebSqlSync。我使用 PHP:5.4.7 这是 json var $json
{
"info":"",
"data":{
"clientes":[],
"conceptos_gastos":[],
"formaspago":[{
"idFormaPago":7,
"FormaPago":"quwuw",
"Dias":1,
"Cuotas":1,
"last_sync_date":null
}],
"listaprecios":[],
"producto":[],
"repartidores":[],
"tipodocumento":[],
"vehiculos":[],
"zonas":[]
}
}
当我尝试获取值时
$js=json_decode($json,true);
foreach ($js['formaspago'] as $row ) {
echo $row["Formapago"];
}
我收到此错误:
为 foreach 提供的参数无效
任何帮助表示赞赏