I have simple array like
Array
(
[vaucher] => 000000000000000001ea0e0e697ac203f2420d36c54ad7b2f16c5a3e0692a11b
[addresses] => Array
(
[0] => address_1
[1] => address_2
[2] => address_3
)
[received] => 2017-01-03T06:49:28.593Z
...
)
and I'm trying to match address from [addresses]
with address from my database but I've got Illegal string offset 'addresses'
Here is what I've trying to do
$match = false;
foreach ($total['addresses'] as $data) {
if ($data == $order->address) {
$match = $data;
break;
}
}
Why I've got illegal string offset here? I have tried with another array like on the provided SO thread and it's worked.. but this one doesn't work so it doesn't help me.