You can use array_chunk() to split an array of data into smaller arrays, in this case of length 2, for each row.
Note that if you have an odd number of values, this will leave a final row with only one cell. If you want to add an empty cell if necessary, you could check the length of $row within the outer foreach.