Hi,
I have an array that can have any number of values. I need to be able to split the array 3 ways and any remainder will get put onto the final array. Reason for this is I want to display the data in 3 columns and cannot have any more than this.
Originally I though this would work:
PHP Code:
$count = count($_SESSION['raw_keyword_list'])/3;
$ar = array_chunk($_SESSION['raw_keyword_list'],$count);
But it sometimes leaves me with a remainder which consequently the function puts into a fourth array.
Any ideas?
Bookmarks