Bifalgorithm post · Computer science one · Order of Precedence
How are if, if-else, and if-else-if statements used in PHP?
How are if, if-else, and if-else-if statements used in PHP? (Computer science one · Order of Precedence) — "38.2. If, If-Else, If-Else-If Statements Conditiona…
Ideas in this flowchart
- Condicionales If, If-Else e If-Else-If en PHP
- PHP utiliza las palabras clave if, else y else if.
- Las condiciones se colocan entre paréntesis después de if y else if.
- El Código de muestra 38.1 contiene ejemplos de las tres formas.
- La instrucción if($x < 10) no lleva punto y coma al final.
- No se usa punto y coma porque la instrucción condicional determina el flujo de control.
- Una instrucción ejecutable sí se diferencia de esta estructura de control.
- El texto plantea como error hipotético incluir un punto y coma.