title: how to check if a table exist using pdo
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1525784/mysql-check-if-a-table-exists-without-throwing-an-exception">MySQL check if a table exists without throwing an exception</a>  </p>
  </blockquote>
  
  
  
  <p>Basically I have my MySQL dbname = test and my table name = page.</p>
  
  <p>I want to create a query using a php PDO to check if the table "page" exists in my db "test"</p>
  
  <p>I've tried this but it doenst work.. it always tells me that it doesnt exists.. even when it does</p>
  
  <pre><code>if (array_search('pages',$db-&gt;query('show tables')-&gt;fetch()) !== false) { echo "the db exists";
  
      } else { echo "the db doesnt exists";
      // Create tableS
      //$IDB-&gt;execute();
      }
  </code></pre>