Posted By

ursdeep on 06/09/15


Tagged

javascript php code operator shorthand Ternary


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

ursdeep


Shorthand for Ternary Operator in PHP


 / Published in: PHP
 

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

Shorthand for Ternary Operator in PHP

  1. Shorthand for Ternary Operator in PHP
  2.  
  3. $color = $_GET['color']?:'blue';
  4.  
  5. Ref: https://techfiddler.wordpress.com/2015/03/06/shorthand-for-ternary-operator-in-php/

Report this snippet  

You need to login to post a comment.