split php array into smaller chunk

In this post we will splitting an php array into smaller chunk might be useful for setting up a report, calendar or pagination on a site. Either way there are numerous ways to do this but the following seems to be the quickest and most reliable method.

Function to split an php array into smaller chunk or section

 

Now let’s take an example of a to  z alphabets and divide them into 10 -10 array group.

Following output we will get

 

That’s It!

Thanks

 

Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *