Split Array Into Chunks

Actually just a PHP function but I just had this code sitting around so tossed it on here.