turnery expression php

33

(condition) ? /* value to return if condition is true */ 
            : /* value to return if condition is false */ ;
echo empty($address['street2']) ? "Street2 is empty!" : $address['street2'];

Comments

Submit
0 Comments