如何通过3个PHP拆分数组

Problem
I have a form table with multiple textbox and one submit button

enter image description here

Im using implode but all value's are inserted in array

$val = implode(',',$textboxval);

result is (80,80,80,40,80,90,70,70,70)
What i want is i want to insert each row of data's in an group of array in the database
[0]=(80,80,80),1=(40,80,90),2=(70,70,70)
RESULT
enter image description here

You could use array_chunk:

foreach (array_chunk($textboxval, 3) as $values) {
   $val = implode(',', $values);
   // insert $val into database
}