Looped Array to print as csv

I think that something like this is more understandable

int anArray[2][3] = {{12, 13, 14}, {15, 16, 17}};
boolean needComma = false;

void setup()
{
  Serial.begin(115200);
  byte bytesPerEntry = sizeof(anArray[0][0]);
  byte cols = (sizeof(anArray[0]) / bytesPerEntry);
  byte rows = ((sizeof(anArray) / cols) / bytesPerEntry);
  for (int r = 0; r < rows ; r++)
  {
    for (int c = 0; c < cols; c++)
    {
      if (needComma)
      {
        Serial.print(",");
      }
      Serial.print(anArray[r][c]);
      needComma = true;
    }
  }
}

void loop()
{
}