PHP ternary operator

$displayname = ($user['Name']) ? $user['Name'] : 'Guest';

See examples: https://davidwalsh.name/php-ternary-examples

Advertisements