Created
May 11, 2014 01:03
-
-
Save jonataa/b4fb1b1ee68f30e18908 to your computer and use it in GitHub Desktop.
Operador Ternário
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$numero = 30; | |
echo $numero > 20 ? 'maior que 20' : 'menor ou igual a 20'; | |
/** Output | |
maior que 20 | |
**/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment