Subject: PHP

Ternary Operator

Create a variable $age = 18. Use the ternary operator to check if the age is greater than or equal to 18 and display "Adult" or "Minor".

Select file or drag and drop

PNG, JPG, SVG

Preview