I have this code that loops through a list and post it in an option tag. But I get an undefined offset notice everytime I try to run it.
<?php $datearray=array('Jan','Feb','Mar'); ?>
<?php for($d=0;$d<=sizeof($datearray);$d++){ ?>
<select title="mm" name="month" id="month" class="">
<option><?php echo $datearray[$d]; ?></option>
<?php } ?>
</select>
How do I solve this?Is there a better way on doing this?