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:
File Upload Using Angular Js and Node Js28-05-2018 AngularJs Node js file upload multer module |
How To Get Your Blogs Posts Using Blogger API30-07-2017 blogger api json php |
Navigate to another page using java script06-03-2017 javascript redirection navigation |
How to find Angular Errors06-03-2017 errors angularjs exceptionHandler |
Get random strings from given string In javascript21-02-2017 javascript random string |