オフセット私はこの配列PHPの配列:不正な文字列が
//this is onw part of `$pins['location']`
array(9) {
["address"]=> string(23) "11xxx Hudderfield xxxxxx"
["city"]=> string(12) "Jxxxxxx"
["houseNumber"]=> string(5) "11xxx"
["id"]=> NULL
["state"]=> string(2) "xx"
["country"]=> NULL
["street"]=> string(17) "Hudderfield xxxxx"
["unit"]=> NULL
["zip"]=> string(5) "xxxx"
}
エラーがあります:コードは、私は、エラー警告が表示されます実行されたときにそれははるかに大きな配列内にある
を不正な文字列は、私はあなたが見ることができるように変数に配列の値を渡すことができるようにする必要があります77
76 foreach ($pins['location'] as $pin_lo) {
77 $location_address = $pin_lo['address'];
78 echo $location_address;
79 $location_city = $pin_lo['city'];
80 echo $location_city;
81 }
ライン上/home/../../../cron.phpの「アドレス」をオフセット。もし私がdd($ pins ['location']); foreachの後に配列が変更されているときには、文字列としてすべてが表示されます。これは、各行の最初の文字または数字だけを返します。
チェックアウト、この[リンク] https://stackoverflow.com/questions/9869150/illegal-string-offset-warning-php – lovelace