And a more unconventional method:
$map = array(10, 20, 30, 40); // == range(10, 40, 10); $map = array_combine($map, $map); $value = "{$map[$_GET['something']]}";
It has the advantage of implicitly generating a notification of unwanted parameters (for logging).
mario source share