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:
Detect AdBlock with JavaScript in my browser30-07-2017 AdBlock javascript detect |
How To Get Your Blogs Posts Using Blogger API30-07-2017 blogger api json php |
Convert Time 24 hrs to 12 hrs format In javascript12-03-2017 date javascript 12hrs convert |
Filter for change Date format (MM-dd-yyyy) in Angular Js05-03-2017 mm-dd-yyyy date formats angular js |
Get Unique values from array/object in javascript19-02-2017 javascript unique remove repeated values from array |