php tenary oerator code example
Example 1: php ternary operator
(Condition) ? (Statement1) : (Statement2);
Example 2: shorthand if php
$is_admin = ($user['permissions'] == 'admin') ? true : false;
(Condition) ? (Statement1) : (Statement2);
$is_admin = ($user['permissions'] == 'admin') ? true : false;