Created
December 4, 2012 22:44
-
-
Save aprea/4209748 to your computer and use it in GitHub Desktop.
Get all DB tables from a WordPress database installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function reset_array( &$value, $key ) { | |
$value = $value[0]; | |
} | |
function get_tables() { | |
global $wpdb; | |
$results = $wpdb->get_results( 'show tables from ' . DB_NAME, ARRAY_N ); | |
array_walk( $results, 'reset_array' ); | |
return $results; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment