public struct CoOrds
{
public int x, y;
public CoOrds(int p1=0, int p2=0)
{
x = p1;
y = p2;
}
}
CoOrds[,] coordsRabbits = new CoOrds[5, 5];
for ($row = 2; $row <= $highestRow; ++$row) {
//при добавлении в массив можешь дополнительно провалидировать trim, strip_tags и прочее если надо
$dataExcell[] = sprintf(
"('%s', '%s', '%s')",
$worksheet->getCellByColumnAndRow(0, $row),
$worksheet->getCellByColumnAndRow(1, $row),
$worksheet->getCellByColumnAndRow(2, $row)
);
if(($row+5) <= $highestRow){
$dataExcell[] = sprintf(
"('%s', '%s', '%s')",
$worksheet->getCellByColumnAndRow(0, ++$row),
$worksheet->getCellByColumnAndRow(1, $row),
$worksheet->getCellByColumnAndRow(2, $row)
);
...
...
...
}
}