I am trying to populate a dropdown list with values from a text file. I have the following code, however, I am not getting any thing within the dropdown list. Can anyone help me?
Here's my code for the jquery and HTML dropdown list:
<script>
$filename = 'pytxt.txt';
$eachlines = file($filename, FILE_IGNORE_NEW_LINES);
echo '<select name="value" id="value">';
foreach($eachlines as $lines){
echo "<option>($lines)</option>";
}
echo '</select>';
</script>
</head>
<body>
<div id="page-wrap">
<h1>Pulls from text files</h1>
<select id="value">
<option selected value="base">Please Select</option>
<option value="1"></option>
<option value="2"></option>
</select>
</div>
</body>