title: how to display all tables name from mysql database using php?
body: <p>how to display all tables name from mysql database using php? I am using this syntax.. can anybody guide me where i m wrong.. thanks in advance</p>
  
  <pre><code>    &lt;?php
  
  $db = mysqli_connect('localhost','root','','realestate');
  
  // Check connection
  if (mysqli_connect_errno($db))
    {
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
    }
    else 
    {
    echo "Successfully connected to database.&lt;/br&gt;";
    }
  
    $result = mysql_query("SHOW TABLES FROM 'realestate'");
  
    while ($row = mysql_fetch_array($result))
    {
    echo $row[0];
    }
  
  
    ?&gt;
  </code></pre>