Skip to content

Instantly share code, notes, and snippets.

@johnmorris
Last active May 22, 2019 11:52
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save johnmorris/5477371 to your computer and use it in GitHub Desktop.
Save johnmorris/5477371 to your computer and use it in GitHub Desktop.
How to create an HTML select box from a MySQL results array using PHP.http://youtu.be/rSncrXP0HeU
<?php
$sql = "SELECT * FROM queried_table";
$query = mysql_query($sql);
while ( $results[] = mysql_fetch_object ( $query ) );
array_pop ( $results );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment