Provides a helper function to split an array into N number of evenly distributed partitions (i.e. split a list into N columns)
As of April 2026, array_partition is a WordPress array plugin with 10 active installations and a 0/5 rating0. It has been downloaded 4.3K+ times in total. Requires WordPress 1.2+ and PHP false+. Available on WordPress.org since 2009. Top alternative: Convert Data.
This plugin provides the PHP function c2c_array_partition() to split an array into any number of sub-arrays, suitable for creating evenly distributed, vertically filled “columns”. Also known as “chunking” or “partitioning”.
For example:
$topics = array( "aardvark", "bear", "cat", "dog", "emu", "fox", "gnu", "hippo", "ibis", "jackal" );
print_r( c2c_array_partition( $topics, 4 ) );
Yields:
Array
(
[0] => Array
(
[0] => ant
[1] => bear
[2] => cat
)
[1] => Array
(
[0] => dog
[1] => emu
[2] => fox
)
[2] => Array
(
[0] => gnu
[1] => hippo
)
[3] => Array…| WordPress | 1.2+ requiredTested up to 6.8.5 |
| PHP | false+ required |
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.