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 273 views
1 answer 297 views
1 answer 313 views
1 answer 304 views
4 answers 594 views
594 views asked Jul 31, 2020 by avibootz
...