Answers for "php "...""

PHP
0

php ?:

// Example usage for: Ternary Operator
$action = $_POST['action'] ?: 'default';

// The above is identical to this if/else statement
if (empty($_POST['action'])) {
    $action = 'default';
} else {
    $action = $_POST['action'];
}
Posted by: Guest on April-24-2020

Browse Popular Code Answers by Language