Created
December 10, 2013 17:04
-
-
Save NoMan2000/7894143 to your computer and use it in GitHub Desktop.
PHP loop over a DISTINCT Index Value with option fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sql_value = "SELECT DISTINCT siteID FROM users WHERE entityID = $someVariable GROUP BY siteID;"; | |
$sql_res = mysqli_query($dropdown_connect, $sql_value) or die(mysqli_error($dropdown_connect)); | |
while ($row_info = mysqli_fetch_array($sql_res)) { | |
echo "<option value='$row_info[0] . '>" . $row_info[0] . "<style='width:200px;'></option>"; | |
} // End while loop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment