zipp Posted July 11, 2007 Share Posted July 11, 2007 Hello, I am new here. I was wondering if anyone would be able to help me with this question: How can I get all the tables from a database to dump into an array? This is what Im working with right now: $tables = "show tables"; $tables = mysql_query($tables) or die ("tables");//mysql_error() $tables = $tables['']; I would appreciate any help with this, as I have been stuck on this for several days now. Link to comment https://forums.phpfreaks.com/topic/59373-php-sql/ Share on other sites More sharing options...
JasonLewis Posted July 11, 2007 Share Posted July 11, 2007 like this? $tables = mysql_query("SHOW TABLES") or die (mysql_error());//mysql_error() $table = ""; while($arr = mysql_fetch_array($tables)){ $table[] = $arr[0]; } print_r($table); Link to comment https://forums.phpfreaks.com/topic/59373-php-sql/#findComment-294964 Share on other sites More sharing options...
zipp Posted July 11, 2007 Author Share Posted July 11, 2007 YES!!! TY!! You have saved me so much stress. I cant thank you enough thank you Link to comment https://forums.phpfreaks.com/topic/59373-php-sql/#findComment-295058 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.