So I'm getting a Undefined index: id
error when attempting to add something to a property.
So I have a cURL request that I'm making and grabbing all the data and then outputting it into an array.
Here is the foreach loop:
foreach($offices_array_array as $office_array) {
print_r2($office_array);
}
Here is the output for that foreach:
Array
(
[total] => 131
[per_page] => 500
[current_page] => 1
[last_page] => 1
[prev_page] =>
[next_page] =>
)
Array
(
[0] => Array
(
[id] => 1
Now when I do this:
foreach($offices_array_array as $office_array) {
$Office->set_office_id(trim($office_array['id']));
}
I get this error: Notice: Undefined index: id in