Re: Control Structure Syntax Question
| From: | daniel at electroteque dot org | Date: | Tue, 09 Mar 2004 23:44:18 +0000 |
| Subject: | Re: Control Structure Syntax Question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-179952@lists.php.net to get a copy of this message | ||
$x ? action1 : action2;
> structure...
>
> It looked something like:
>
> $x : action1 : action2;
>
> I'm trying to shorten having to do the following:
>
> if ($x) {
> action1;
> } else {
> action 2;
> }
>
> can someone please post the syntax if they know it? I am reading the
> fine documentation but can't find it...
>
> many thanks
>
> Ahbaid
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php