Ok, I was using the:
because I am generating 100 <option>s in the <select>, but your solution:
is prettier. Thank you, Pyro.
Trouble is, I have still got the gaps in the <select>.
The <option>s are a list of dates (the difference between one that are in the DB, ie booked, and the ones that are not) and for the sake of readability and useability I want to keep the gaps.
The gaps are currently blank, which is acceptable but not perfect.
I don't want to remove the gaps because I think that users would expect to find a four "week" gap between January and March (if all of the weeks (4) in February are booked.
Really I just want to fill in those gaps with the word "Booked" and wondered if you could do it by creating another array(), maybe:
$booked=array('Booked', + 'Booked', another 99 times);
and slotting it in the gaps in $selected_date.
or maybe using array_splice() or in_array() somehow.
Any input gratefully recieved.