Answers for "php short ternary operator bool"

PHP
3

shorthand if php

$is_admin = ($user['permissions'] == 'admin') ? true : false;
Posted by: Guest on May-15-2020
2

php ternary shorthand

$y = $x ? "true" : "false";
Posted by: Guest on May-25-2020

Browse Popular Code Answers by Language