It is for static page, dynamic page, website, SEO, performance and other web development discussion
Explain the ternary conditional operator in PHP?
The ternary conditional operator is of the form:
(expr1) ? (expr2) : (expr3)
If expression 1 evaluates to be TRUE the above evaluates to expression 2 else expression3.
$message = ($val = "60") ? "First class" : "Second class!";
Return to “PHP, HTML, MYSQL and Web Hosting”
Users browsing this forum: No registered users and 1 guest