- array_slice: documentation ( source)
- printf: documentation ( source)
<?php
function arrToStr($arr){
$str = "";
foreach($arr as $a) $str .= $a;
return $str;
}
$lol = array(
"why" => ["wont", "this", "work"],
"its" => ["pretty", "darn", "annoying"],
"hur" => ["dur"]
);
$omg = array_slice($lol, 0, 1, count($lol), true);
foreach($omg as $wtf => $bbq){
printf("%s: %s", $wtf, printArr($bbq));
}