Course lesson
Refactor a PHP if else statement into a ternary
An if statement that depends upon the logic of a boolean can be simplified into something called a "ternary", which can lead to more concise & readable code.
- Duration
- 4 min
- Access
- Included
- Transcript
- Retained from source evidence
An if statement that depends upon the logic of a boolean can be simplified into something called a "ternary", which can lead to more concise & readable code.