I have the following code in a view for setting the selected option for a dropdown I have used loops for this kind of thing before, but never a switch, it is breaking at some point for the syntax. is this even possible in php? sorry if it is a dumb mistake.
<?switch($_GET['rows']):?>
<select name="rows" onchange="$('#paginacao').submit()">
<option value="10" <?case 10: echo 'selected'; break;?>>10</option>
<option value="15" <?case 15: echo 'selected'; break;?>>15</option>
<option value="20" <?case 29: echo 'selected'; break;?>>20</option>
<option value="100" <?case 100: echo 'selected'; break;?>>100</option>
</select>
<?endswitch;?>