Web Developer
How to use the PHP Ternary Operator?
Example: If the value of $a is larger than 25, $30 will be returned and allocated to $b; else, $15 will be returned and assigned to $b.
<?php $a = 20; $b = $a > 25 ? 30 : 15; print ("Value of b is " . $b); ?>
Auto Sync....
Select Categories