我使用一个库将本地 WebSQL DB 同步到服务器,特别是https://github.com/orbitaloop/WebSqlSync。我使用PHP:5.4.7,当我尝试如下获取数组值时,我得到消息
非法字符串偏移 'clientes'
$obj 变量是:
Array
(
[info] =>
[data] => Array
(
[clientes] => Array
(
)
[conceptos_gastos] => Array
(
)
[formaspago] => Array
(
[0] => Array
(
[idFormaPago] => 10
[FormaPago] => qwerqwe
[Dias] => 1
[Cuotas] => 1
[last_sync_date] =>
)
)
[listaprecios] => Array
(
)
[producto] => Array
(
)
[repartidores] => Array
(
)
[tipodocumento] => Array
(
)
[vehiculos] => Array
(
)
[zonas] => Array
(
)
)
)
这是循环
foreach ($obj as $row => $value) {
echo $row["clientes"]["fomaspago"]["FormaPago"];
}
永远感激任何帮助