I want to avoid this notation:
$transactionsRows = [];
foreach ($data['invoces'] as $key => $invoice) {
$transactionsRows[] = array();
}
Could I use closure in php to fill like this:
$transactionsRows = closure_fill(/* HERE FILL ARRAY AND RETURN */);
You can by using this function: array_values($array)
$transactionsRows = array_values($data)