Forum Moderators: coopster
I have a code that is pasted below, the code basically dynamically creates a list of option values for a form select function.
$period_select = "<SELECT name='period'>";
foreach($RET as $period)
{
$period_select .= "<OPTION value=$period[COURSE_PERIOD_ID]".((UserCoursePeriod()==$period['COURSE_PERIOD_ID'])?' SELECTED':'').">".$period['COURSE_TITLE']."</OPTION>";
if(UserCoursePeriod()==$period['COURSE_PERIOD_ID'])
{
$_SESSION['UserPeriod'] = $period['PERIOD_ID'];
}
}
$period_select .= "</SELECT>";
What I want to do is determine if any of the option line has the $period['COURSE_TITLE'] as blank and if so I dont want that entire option line to be echo'ed in the result.
can anyone please tell me how I can achive this?
many thanks