Menu
Is there a way to chunk arrays according to a db field?
Example:
– Pull from the database several records.– Each record has a “class_id” field.– Sort each record by their “class_id”.– Create an array for each “class_id”.
So all the records with “class_id” of 1 would be in an array, and all with 2 in an array and so on…
Is this possible?
Thanks ?
Will