I'm trying to output the table names of a mysql database into a dropdown menu. Although I was somewhat successful I've encountered a strange problem and I'm not sure what's causing it. Any ideas would be much appreciated
The code
$query="show tables from internal";
$result=mysql_query($query);
$result_array = array();
while($row = mysql_fetch_assoc($result))
{
$result_array[] = $row['Tables_in_internal'];
}
echo'<select name="Tables">';
foreach($result_array as $name){
echo'<option value="'.$name.'>'.$name.'</option>';
}
echo'</select>';
What show up on the page
What the database has for tables
2016_08_27_18_10
2016_08_28_03_35
2016_08_29_03_12
2016_08_30_03_34
2016_08_31_03_49
2016_09_01_03_22
2016_09_02_03_45
2016_09_03_03_35
2016_09_04_03_10


valueattribute.value=-->"<--'.$name.'-->??<--