<?php $types = array( "text" => 2, "image" => 2, "audio" => 2, ); $result = []; for ($i = 0, $universalCount = current($types); $i < $universalCount; ++$i) { array_push($result, ...array_keys($types)); } var_export($result);
You have javascript disabled. You will not be able to edit any code.