I am new to HTML and PHP. And I am trying to assign an array of values to the
<option value=...> of a combo list. But what I am trying to do is not working. I
can sucessfully get it to work if I assign each value separately.
I wonder if anyone could please help me with this problem. Below is my code.
Thank you and Best Regards,
Akino.
----------------------------------------------------------------------------------------------------------------
Expand|Select|Wrap|Line Numbers
- <html>
- <head>
- <title>Testing testing...</title>
- </head>
- <?php
- $time = array("Morning", "Afternoon", "Night");
- ?>
- <body style="padding-left:48pt">
- <form id="subForm" name="subForm" method="post">
- <b>Select your favorite time of day :</b><br/>
- <select name="ToD" size="1">
- <!--
- <option value="Morning">Morning</option>
- <option value="Afternoon">Afternoon</option>
- <option value="Night">Night</option>
- -->
- <option value="<?php $time ?>"></option>
- </select><br/<br/>
- </form>
- </body>
- </html>