That is the ternary operator, it is somewhat equivalent to an if-then-else statement.
Basically that code is saying that if $orderdir is contained within the array("ASC", "DESC") then return $orderdir; otherwise default to return the value "ASC". The result is a string. To give you an idea as to it's logic, it's roughly equivalent to: