PHPize Online / SQLize Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $first = [1,7,3]; $second = [1,2,10]; $res = []; foreach ($first as $i=>$v) { $res = array_merge($res, array_fill(0, $second[$i], $v)); } var_export($res);
Show:  
Copy Clear