Return to Snippet

Revision: 69376
at June 9, 2015 01:17 by ursdeep


Initial Code
Shorthand for Ternary Operator in PHP

$color = $_GET['color']?:'blue';

Ref: https://techfiddler.wordpress.com/2015/03/06/shorthand-for-ternary-operator-in-php/

Initial URL
https://techfiddler.wordpress.com/2015/03/06/shorthand-for-ternary-operator-in-php/

Initial Description
Shorthand for Ternary Operator in PHP

Initial Title
Shorthand for Ternary Operator in PHP

Initial Tags
javascript, php, code

Initial Language
PHP