So, I have a comma delimited string which I want to split into two strings after count of x commas.
So, if my string was as follows:
temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9, temp10
I want to split it into two strings after a count of 4 commas, I would expect:
$string1 = 'temp1, temp2, temp3, temp4, ';
$string2 = 'temp5, temp6, temp7, temp8, temp9, temp10';
How can I achieve this in PHP?