Store that days that you want to use in the option values ie
<select name="days">
<option value="sunday" >only sunday</option>
<option value="saturday-sunday">sat and sun</option>
<option value="monday-tuesday-wednesday-thursday-friday">Monday to Friday</option>
<option value="monday-wednesday">Only Monday or Wednesday</option>
</select>
if (isset($_POST['sd']) && isset($_POST['days'])) {
$startDate = new DateTime($_POST['sd']);
$days = explode('-', $_POST['days']);
$count = count($days);
$dates = array();
$currentDate = $startDate->format('Y-m-d');
$j = 0;
for ($i=0;$i<10;$i++) {
$day = $days[$j];
$a = new DateTime($currentDate);
$a->modify("next $day");
$dates[] = $currentDate = $a->format('Y-m-d');
$j = (($j+1) == $count) ? 0 : $j++;
}
foreach ($dates as $date) {
echo $date.'<br />';
}
}
Hope this helps! :)
EDIT
or if you only want the last one of the array:
instead of the foreach
use
echo end($dates);