Here's an example where I retrieve dates from a table, create the select list, and display the date in a more readable format for the user.
++++++++++++ snip +++++++++++++++
while (is_array($date_array))
{
print("<option value=\"");
print($date_array["next_date"]);
print("\">");
$year = substr($date_array["next_date"], 0,4);
$month = substr($date_array["next_date"], 5,2);
$day = substr($date_array["next_date"], 8,2);
print("$month/$day/$year");
if ( ifx_num_rows($datesCR) == 5) / Stop after getting 5 dates /
{
break;
}
$date_array = ifx_fetch_row($datesCR, "next");
} / end while /
print("</select>\n");