no output for select box
Hi all
I am working on php-html program. I have following code which gives output, I want it in select box. But it is not showing select box. I dont know why?
PHP Code:
<?php
@ $today = getdate ();@ $month = $today [ mon ];@ $year = $today [ year ];@ $num = 0 ;
$semester =array( "Spring" , "Summer I" , "Summer II" , "Summer" , "Fall" );
while( $num <= 5 )
{[ B ] $sem [/ B ]= $semester [ $num ]. " " . $year ; $num = $num + 1 ;}
?>
<td><div id="Gen_Combo"><select id ="Gen_Combo1" name ="combo_gen[]" size="4" style="width: 100px; font-size: 10px;" >
<?= [ B ] $sem [/ B ] ?> </select></div></td></tr>
If I echo $sem, it will print it. But if I try to echo it in select box, it is not showing output......
Thanks in advance
PHP Code:
<?php
$today = getdate ();
$month = $today [ mon ];
$year = $today [ year ];
$num = 0 ;
$semester =array( "Spring" , "Summer I" , "Summer II" , "Summer" , "Fall" );
?>
<td><div id="Gen_Combo">
<select id ="Gen_Combo1" name ="combo_gen[]" size="4" style="width: 100px; font-size: 10px;" >
<?php
while( $num <= 5 )
{
echo "<option>" . $semester [ $num ]. " " . $year . "</option>\n"
; $num = $num + 1 ;}
?>
</select>
</div></td>
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in
Nation
eBookworm.us
Thanks a lot...... it is working now....
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks