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. Quote Link to comment 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); Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.