have to execute a call to an API x amount of times. The call returns one array for each loop and I have to append the arrays together for one master array. I won't know how many times the loop.
$pages is the amount of times I need to loop.
for ( $i = 0; $i< $pages; $i++ ) {
$searchcustomers[$i] = $sc->call('GET', '/admin/customers.json?limit=5&page=$i');
$mastercustomerlist = array_merge_recursive($searchcustomers[$i]);
}
I know this is totally wrong. I'm not sure how to get that master list and append the arrays automatically in the loop without knowing the name