Código PHP:
<?php
// Example usage for: Ternary Operator
$action = (empty($_POST['action'])) ? 'default' : $_POST['action'];
// The above is identical to this if/else statement
if (empty($_POST['action'])) {
$action = 'default';
} else {
$action = $_POST['action'];
}
?>
La expresión (expr1)? (Expr2): (expr3) evalúa a expr2 si expr1 se evalúa como TRUE, y expr3 si expr1 se evalúa como falso
Mas info:
http://www.google.es/search?q=operac...f4a62b56d154cb