Jump to content

code not working


swapnali_s230

Recommended Posts

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

@$today = getdate();@$month=$today[mon];@$year=$today[year];@$num=0;

$semester=array("Spring", "Summer I", "Summer II", "Summer", "Fall");

while($num<=5)

{$sem= $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;" >

<?=$sem?></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

   

Link to comment
https://forums.phpfreaks.com/topic/261329-code-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.