Zebra_Database::get_tables PHP Method

get_tables() public method

get all tables from database $tables = get_tables();
Since: 1.1.2 @return array An array with all the tables in the current database.
public get_tables ( ) : array
return array
    function get_tables()
    {
        // fetch all the tables in the database
        $result = $this->fetch_assoc_all('', $this->query('
            SHOW TABLES
        '));
        $tables = array();
        // as the results returned by default are quite odd
        // translate them to a more usable array
        foreach ($result as $tableName) {
            $tables[] = array_pop($tableName);
        }
        // return the array with the table names
        return $tables;
    }