i have this array
//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"
}
The Error:
It is inside a much bigger array when the code is ran i get the error Warning: Illegal string offset 'address' in /home/../../../cron.php on line 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 }
I need to be able to pass the array value to a variable as you can see. If i dd($pins['location']); it show everything as strings not sure when the array is getting changed after the foreach it will only return the first letter or number of each of the lines any ideas?