note 40523 deleted from language.operators by tularis
| From: | tularis@php.net | Date: | Tue, 12 Oct 2004 14:05:54 +0000 |
| Subject: | note 40523 deleted from language.operators by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-78419@lists.php.net to get a copy of this message | ||
Note Submitter: j dot gizmo at aon dot at
----
this ternary operator is more or less a shortform of an if/else statement.
you can also use it on its own.
($condition=='good') ? (print('we have good conditions.')) : (print('we
have bad conditions.'));