<?php

$numerolinhas = 4;
$numerocolunas = 6; 
$linhas = "";
$linhas = " <tr>\n";
$controws = 0;
$colunas = "";
$colunas = "  <td></td>\n";
$th = "  <th></th>\n";

echo "<table>\n";   
for ($i = 0; $i < $numerolinhas; $i++) {
    echo $linhas;

        if ($i==0){
            for ($k = 0; $k < $numerocolunas; $k++) {
                echo $th;
            }
            echo " </tr>\n<tr>\n";  
        }


        for ($x = 0; $x < $numerocolunas; $x++) {
            echo $colunas;
        }
    echo " </tr>\n";
    $th="";
}   
echo "</table>";