Helper function that splits an array into N number of evenly distributed partitions (i.e. split a list into N columns). Can be used generally in PHP projects or in WordPress as a plugin (for which it has the requisite layout).
This plugin is available in the WordPress Plugin Directory: https://wordpress.org/plugins/array-partition/
Use as a general PHP helper:
- Include the
array_partition.php
file in your code. - Use the
c2c_array_partition()
function provided by this script in your own code.
Use as a WordPress plugin:
- Install via the built-in WordPress plugin installer. Or install the plugin code inside the plugins directory for your site (typically
/wp-content/plugins/
). - Activate the plugin through the 'Plugins' admin menu in WordPress
- Use the
c2c_array_partition()
function in your template(s) or code as desired.
- See readme.txt for additional usage information.
- See CHANGELOG.md for the list of changes for each release.
Commercial support and custom development are not presently available. You can raise an issue on GitHub or post in the plugin's support forum on WordPress.org.
If the plugin has been of benefit to you, how about submitting a review for it in the WordPress Plugin Directory or considering a donation?
This plugin is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.