RE: if regex
| From: | Anders Janson | Date: | Tue, 09 Oct 2001 10:22:12 +0000 |
| Subject: | RE: if regex | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1633@lists.php.net to get a copy of this message | ||
Gregor Fajdiga wrote:
> sorry me, but an simple example would do. i can hardly help myself with that.
You can put PHP function calls within the "if" statements.
Have a look at http://www.phpinsider.com/php/code/Smarty/docs/x655.htm#AEN809
Haven't tried this myself, but something like this should work:
{if preg_match( [your regex pattern here],[your subject here]) == true}
Whee!
{/if}
Oh, BTW, if you have security enabled, you will have to add preg_match to the
array IF_FUNCS.
/Anders