Re: [SMARTY-DEV] Fwd: Cannot get conditional statement to work
| From: | messju mohr | Date: | Sun, 12 Oct 2003 23:45:15 +0000 |
| Subject: | Re: [SMARTY-DEV] Fwd: Cannot get conditional statement to work | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1900@lists.php.net to get a copy of this message | ||
this is the wrong mailing-list. try php-general.
On Sun, Oct 12, 2003 at 04:15:01PM -0400, Adam wrote:
> All,
>
> I apologize if this question is overly simplistic. I'm trying to write
> a conditional statement that I just cannot get to work. The statement
> reads:
>
> (preg_match($strPattern, $strSource)) ? echo 'Match Found.' : echo 'No
> match.';
>
> Each and every time I go to the page containing this statement I
> receive a parsing error with the message "unexpected T_ECHO".
>
> If I rewrite the statement to read:
>
> if (preg_match($strFilter, $strValue)) echo 'A match was found!'; else
> echo 'Not found!';
>
> I have no issue. However, its really ticking me off that I cannot get
> it to work the first way. I am using PHP
>
> Regards,
> Adam
>
> Platform versions: PHP 4.3.0, Apache 1.3, and Mac OS X 10.2.6
>
> --
> Smarty Development Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php