Try following example to understand the conditional operator.
$a = 10; $b = 20; /* If condition is true then assign a to result otheriwse b */ $result = ($a > $b ) ? $a :$b; echo $result;
Here $a is if condition and $b is in else condition.
You might also like:
Compare the Triplets | Javascript | hackerrank.com07-05-2020 hackerrank.com |
How to search text in string using php ?29-10-2017 php search string search |
Sanitization in java sript14-03-2017 sanitization java script |
Change datepicker display format06-03-2017 datepicker angular js |
Send Mail in Node Js21-02-2017 node js mail npm module |