public function get_tables($database = '') {

        // fetch all the tables in the database
        $result = $this->fetch_assoc_all('', $this->query('
            SHOW TABLES' . ($database != '' ? ' IN ' . $this->_escape($database) : '')));

        $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;

    }
public function get_tables($database = '') {

        // fetch all the tables in the database
        $result = $this->fetch_assoc_all('', $this->query('
            SHOW TABLES' . ($database != '' ? ' IN ' . $this->_escape($database) : '')));

        $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;

    }
public function get_tables ( $ database = '' ) { // fetch all the tables in the database $ result = $ this -> fetch_assoc_all ( '' , $ this -> query ( '
            SHOW TABLES' . ( $ database != '' ? ' IN ' . $ this -> _escape ( $ database ) : '' ) ) ) ; $ 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 ; }
Returns an array with all the tables in a database.

<code>
// get all tables from the currently selected database
$tables = get_tables();
</code>

@param  string  $database   (Optional) The name of the database from which to return the names of existing tables.

If not specified, the tables from the currently selected database will be returned.

<i>This option was added in 2.9.5</i>

@since  1.1.2

@return array   An array with all the tables in the current database.
Returns an array with all the tables in a database .