t5nooa
Last Updated: February 25, 2016
·
692
· wajatimur
1f531a29ca246f02a96460fa5217b910

PHP Ternary Operator (IF/ELSE)

Using ternary operator or shorthand for if/else in PHP will save you lot of time and code line.

echo ($status == ‘sleep’ ? ‘Wake Up!’ : ‘Time to Work!’);
Say Thanks
Respond