I have a function that merges a bunch of bookings from different groups. I want to make it easier to set the group. Heres the function at the moment:
function groups() {
$b1 = bookings(1);
$b2 = bookings(2);
$merge = array_merge($b1, $b2);
return $merge;
}
I would like to make it look something like this:
function groups() {
$merge = bookings(1), bookings(2);
return $merge;
}
The reason is I would like to only have to edit one place if I would like to add a group. Now you have to add $b3 = bookings(3); on one line and $b3 in the array_merge.
Is this possible?