Populate a dropdown list in php from mysql table -
Is it possible to populate a dropdown list in PHP, which only shows 1 column of data table?
This is my PHP file, in this way I get the rows back from the database. I want only 1 column of a MySQL table to be displayed in a dropdown list.
& lt ;? Php // includes all Sangginion included_on ($ _ server ['DOCUMENT_ROOT']. / ELTS /eLTS_lib/libSanggunianManagement.php "); $ StrMessage; $ MySanggunianManager = New SanggunianManager (); if ($ mySanggunianManager- & gt; getAllSanggunian ($ strMessage )) {Print "& lt; Table id = 'myTable' class = 'myTable' border = 0 style = 'font-size: 12px;' & Gt; "; Print" & lt; Tr & gt; "; Foreach ($ mySanggunianManager-> arrHeaders $ strHeader) // print" & lt; Th bgcolor = '# 003f22' & gt; "$ strHeader." & Lt; / Th> "Print" & lt; Br> "Foreign exchange ($ mySanggunianManager-> arr objects as $ myRow) {Print" & lt; Tr & gt; "Print //" & lt; Select & gt; "; Foreign Currency ($ myRow $ strHeader => $ strValue) // print" & lt; Td id = 'td' align = 'center' & gt; "$ strValue." & Lt; / Td> "; Print" & lt; Option & gt; "; Print $ strValue; Print" & lt; / Option & gt; "print" & lt; / Tr & gt; ";} Print" & lt; / Table> ";}? & Gt;
Comments
Post a Comment