I would like to split an array of strings into 3 parts (in PHP), however I do not know if the number of words will be divible by 3.
what would you do in this instance?
let’s say i had a larger amount of text than this example
example input: ‘Here is a sentence of random lenth’
example output: ‘Here is’, ‘a sentence’, ‘of random length’
You can check with the Modulus operand (see http://www.php.net/manual/en/language.operators.arithmetic.php)