TableGenerator don't working
<p>I'm not sure about why isn't working my code. I've searched for help but I don't get any result. </p>

<p>The problem is that I don't get a full table with all the contents that it must print. The objective is to print a table with my timetable using a database.</p>

<p>Here you have an image of the current result:
<img src="https://i.stack.imgur.com/U0cx0.png" alt="Current result"></p>

<p>However, I want to get the full table.</p>

<pre><code>&lt;?php

Class TBG {

    /*
     * #####################################################################################
     * ##################### Partes de Librerías Importantes ###############################
     * #####################################################################################
     */

    private static function initialCheck($param1, $param2, $param3) {

        if(!isset($param1) || !isset($param2) || !isset($param3)){
            return true;
        }
        return false;

    }
    private static function executeQuery($mysqli_table_name, $connection, $rown){

        if(self::initialCheck($mysqli_table_name, $connection, $rown)){
            return;
        }

        $sql = "SELECT * FROM $mysqli_table_name WHERE id = $rown";
        $result = mysqli_query($connection, $sql);

        return $result;
    }
    private static function checkEmptyTable($result){

        if(self::initialCheck(" ", $result, " ")){
            return;
        }

        if($result -&gt; num_rows === 0){
            echo "&lt;center&gt;&lt;h4&gt;Esta tabla no ha sido a&amp;uacute;n generada.&lt;/h4&gt;&lt;/center&gt;";
            return true;
        }
        return false;

    }

    /*
     * #####################################################################################
     * ################################ Librerías ##########################################
     * #####################################################################################
     */

    ///////////////////////////////////

    private static function getAmountOfRows($result){

        if(self::initialCheck(" ", $result, " ")){
            return;
        }

        return $row_max = $result-&gt;num_rows;

    }

    private static function getAssociated($result){

        if(self::initialCheck(" ", $result, " ")){
            return;
        }

        return $row = mysqli_fetch_assoc($result);

    }

    ///////////////////////////////////

    private static function timeStart($row){

        if(self::initialCheck(" ", $row, " ")){
            return;
        }

        switch (strlen($row["time_start"])) {
            case 4:
                return $time_start = substr($row["time_start"], 0, -2).":".substr($row["time_start"], 2, 0);
            case 3:
                return $time_start = "0".substr($row["time_start"], 0, -2).":".substr($row["time_start"], 1, 0);
            case 2:
                return $time_start = "00:".$row["time_start"];
            case 1:
                switch ($row["time_start"]) {
                    case 0:
                        return $time_start = "00:00";
                    default:
                        return $time_start = "00:0".$row["time_start"];
                }
            default:
                break;
        }

    }
    private static function timeEnd($row){

        if(self::initialCheck(" ", $row, " ")){
            return;
        }

        switch (strlen($row["time_end"])) {
            case 4:
                return $time_end = substr($row["time_end"], 0, -2).":".substr($row["time_end"], 2, 0);
            case 3:
                return $time_end = "0".substr($row["time_end"], 0, -2).":".substr($row["time_end"], 1, 0);
            case 2:
                return $time_end = "00:".$row["time_end"];
            case 1:
                switch ($row["time_end"]) {
                    case 0:
                        return $time_end = "00:00";
                    default:
                        return $time_end = "00:0".$row["time_end"];
                }
            default:
                break;
        }

    } 

    ///////////////////////////////////

    /*
     * #####################################################################################
     * ############################ Partes Importantes #####################################
     * #####################################################################################
     */

    private static function generateTableHeader(){

        echo "&lt;table class=\"global-tables-table\"&gt;";
        echo "  &lt;tr&gt;";
        echo "    &lt;th&gt;Tiempo&lt;/th&gt;";
        echo "    &lt;th&gt;Lunes&lt;/th&gt;";
        echo "    &lt;th&gt;Martes&lt;/th&gt;";
        echo "    &lt;th&gt;Mi&amp;eacute;rcoles&lt;/th&gt;";
        echo "    &lt;th&gt;Jueves&lt;/th&gt;";
        echo "    &lt;th&gt;Viernes&lt;/th&gt;";
        echo "    &lt;th&gt;S&amp;aacute;bado&lt;/th&gt;";
        echo "    &lt;th&gt;Domingo&lt;/th&gt;";
        echo "  &lt;/tr&gt;";

    }
    private static function generateTableBody($row, $time_start, $time_end){

        if(self::initialCheck($row, $time_start, $time_end)){
            return;
        }

        echo "  &lt;tr&gt;";
        echo "    &lt;td&gt;".$time_start." - ".$time_end."&lt;/td&gt;";
        echo "    &lt;td&gt;".$row["monday"]."&lt;/td&gt;";
        echo "    &lt;td&gt;".$row["tuesday"]."&lt;/td&gt;";
        echo "    &lt;td&gt;".$row["wednesday"]."&lt;/td&gt;";
        echo "    &lt;td&gt;".$row["thursday"]."&lt;/td&gt;";
        echo "    &lt;td&gt;".$row["friday"]."&lt;/td&gt;";
        echo "    &lt;td&gt;".$row["saturday"]."&lt;/td&gt;";
        echo "    &lt;td&gt;".$row["sunday"]."&lt;/td&gt;";
        echo "  &lt;/tr&gt;";



    }
    private static function generateTableFooter(){
        echo "&lt;/table&gt;";
    }

    public static function generateTable($mysqli_table_name, $connection) {

        if(self::initialCheck($mysqli_table_name, $connection, " ")){
            return;
        }

        if(self::checkEmptyTable(self::executeQuery($mysqli_table_name, $connection, 0))){
            return;
        }

        self::generateTableHeader();
        for ($i = 0; $i &lt; self::getAmountOfRows(self::executeQuery($mysqli_table_name, $connection, 0)); $i++) {
            self::generateTableBody(self::getAssociated(self::executeQuery($mysqli_table_name, $connection, $i)),
                    self::timeStart(self::getAssociated(self::executeQuery($mysqli_table_name, $connection, $i))),
                    self::timeEnd(self::getAssociated(self::executeQuery($mysqli_table_name, $connection, $i))));
        }
        self::generateTableFooter();

    }

}
</code></pre>