 <p>Simplest way to split array into chunks is <code>array_chunk</code>:</p> <pre><code>$farmland = array("Duck","Fox","Goose","Cow","Cat","Rabbit","Bull","Mouse","Sheep","Goat"); $chunks = array_chunk($farmland, 5); // get chunks with size of 5 print_r($chunks); </code></pre>