<?php $array = [['xxx', 3], ['yyy', 2]]; var_export( array_merge( ...array_map( fn($row) => array_fill(0, $row[1], [$row[0]]), $array ) ) );
You have javascript disabled. You will not be able to edit any code.