Im trying to create a form within a php while loop using echo. Following the while loop I would like to continue the form in HTML. The while loop uses a variable created by scandir() to display a list of files in a directory via a drop-down menu i.e. 'select' and 'option' tags.
The interesting bit is when I start my html again after the php loop, my browser (FIREFOX) doesn't display the first few lines of code. More specifically it doesn't recognize the lines between the comments
<!-- FROM THIS POINT --> ...code that isn't displayed... <!-- TO THIS POINT-->
See simplified code below. Thanks in advance!
<!-- HTML... -->
<form action = "" method = "post">
Input File: <select name="drop_down_name" >
<?php
$dir = "/Applications/MAMP/db/mysql/IESE";
$files = scandir($dir, 1);
$i = 0;
while($i <= count($hypo_files)) {
echo "<option value = $files[$i]> $files[$i] </option>";
$i = $i + 1;
}
?>
<!--FROM THIS POINT -->
<fieldset>
<legend>Hypo Query:</legend>
<br>
Input Value: <!-- TO THIS POINT --> <input type = "text" name = "some_value">