I think user2469998 was the closest, but just not very pleasant.
In my example, I use pipe for implode and the str_repeat function to build a string that matches the length, blow it up and split the fat.
$list = array('a','b','c','d'); $length = 6; $result = array_slice(explode('|', str_repeat(implode('|', $list).'|',ceil($length/count($list)))), 0, $length);
Many ways to achieve this, but I thought I would share with you. The only limitation is that you need to use the symbol for hacking and exploding, which does not include an array element, or exploder will not work properly.
:)
crazeyez
source share