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:
How to use http-post request in node js14-03-2017 http-post module node js |
Navigate to another page using java script06-03-2017 javascript redirection navigation |
Change datepicker display format06-03-2017 datepicker angular js |
How to find Angular Errors06-03-2017 errors angularjs exceptionHandler |
How to remove last / value from url in javascript27-02-2017 array javascript last value |