title: Loop mysql database names that starts with selected prefix in php
body: <p>How do i loop only the database names that starts with <code>solarsystem</code> inside a dropdown list.</p>
  
  <pre><code>+---------------------+
  |       dbname        |
  +---------------------+
  | electronics         |
  | vegetables          |
  | solarsystem_sun     |
  | solarsystem_mercury |
  | solarsystem_venus   |
  | solarsystem_mars    |
  | fruits              |
  | foobar              |
  +---------------------+
  </code></pre>
  
  <p>Currently it is looping all the database names</p>
  
  <pre><code>&lt;div class="select"&gt;
      &lt;?php
          $sdbhost = 'localhost';
          $sdbusername = 'root';
          $sdbpassword = '';
          $dbcnx = mysql_connect ($sdbhost, $sdbusername, $sdbpassword);
  
          $dbresult = mysql_query("SHOW DATABASES");
              echo "&lt;select name='dbselect'&gt;";
                  while ($dbrow = mysql_fetch_array($dbresult)) {
                      echo "&lt;option input value='$dbrow[0]'&gt;" .$dbrow[0]."&lt;br&gt;&lt;/option&gt;";
                  }
              echo "&lt;select&gt;";
      ?&gt;
  &lt;/div&gt;
  </code></pre>