<?php $chars = ["a", "b", "c"]; $result = []; foreach ($chars as $char) { $result = array_pad($result, count($result) + 3, $char); } var_export($result);
You have javascript disabled. You will not be able to edit any code.