EDIT: needs to be documented here
I'm getting the reporting about using of array_merge() in loopings. My question is: what is the best way to not do that?
For instance: the code below stores some data from $user, that is an array of int.
$dupesIds = [];
foreach ($users as $user) {
// ...
$dupesIds = array_merge($dupesIds, $user->some_ids_array);
}
EDIT: needs to be documented here
I'm getting the reporting about using of
array_merge()in loopings. My question is: what is the best way to not do that?For instance: the code below stores some data from
$user, that is an array of int.