Created
August 1, 2019 15:18
-
-
Save parzibyte/a69242ff2e20b631a76d6a79ac630bb4 to your computer and use it in GitHub Desktop.
Mayor de edad en PHP - https://parzibyte.me/blog/2018/11/19/mayor-menor-de-edad-varios-lenguajes-de-programacion/
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 | |
/* | |
Mayor y menor de edad en PHP | |
@author parzibyte.me | |
*/ | |
# No hay forma de escanear variables, pero podemos recibirlas por $_POST o $_GET | |
$edad = 50; | |
if ($edad >= 18) { | |
echo "Mayor de edad"; | |
} else { | |
echo "Menor de edad"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment