RE: [PHP] Like ternary but without the else.
| From: | Chris W. Parker | Date: | Sat, 26 Feb 2005 01:28:13 +0000 |
| Subject: | RE: [PHP] Like ternary but without the else. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-209482@lists.php.net to get a copy of this message | ||
Justin Lilly <mailto:justinlilly@gmail.com>
on Friday, February 25, 2005 3:10 PM said:
> This should do the trick:
>
> $something ? $this=$that
Actually that gives a synax error. But I've figured it out based on your
suggestion.
It's actually:
<?php
$something && $this = $that;
?>
Chris.