How to use if shorthand operator inside echo with PHP

1 Answer

0 votes
$a = 13;
$b = 9;

echo $a > $b ? "yes" : "no";

echo "<br />";
  
echo $a == $b ? "yes" : "no";

    
      
      
/*
run:
      
yes
no
       
*/

 



answered Sep 26, 2019 by avibootz

Related questions

1 answer 155 views
1 answer 190 views
1 answer 213 views
1 answer 199 views
4 answers 390 views
390 views asked Jul 31, 2020 by avibootz
...