title: How to check if a mysql database already exists in php?
body: <p>Basically, I want to create a database, but I know there will be problem if you want to create a mysql database that already exists. So how can I check if it already exists in PHP? </p>
  
  <p>Here's the psuedo-code:</p>
  
  <pre><code>if (database exist)
  {do nothing}
  
  //if it doesn't exist
  else 
  {create the database}
  </code></pre>
  
  <p>Now I already know how to create the database it self. That's easy for me, I just don't know how to check if one already exists.</p>