i use library synchronize local websql db server https://github.com/orbitaloop/websqlsync. use php: 5.4.7, when try array values as follows, message
illegal string offset 'clientes'
the $obj var is:
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 ( ) ) )
this loop
foreach ($obj $row => $value) { echo $row["clientes"]["fomaspago"]["formapago"]; }
eternally grateful help
it seems be
$row["data"]["clientes"] // empty array
or
$row["data"]["formaspago"][0]["formapago"] // should output "qwerqwe"
Comments
Post a Comment