- var_dump: documentation ( source)
- array_fill: documentation ( source)
<?php
$that = array();
$that[] = array(3, "cat");
$that[] = array(1, "dog");
$empty = array();
foreach ($that as $word) {
$empty = $empty + array_fill(count($empty), $word[0], $word[1]);
}
var_dump($empty);