Smarty functions and return value
| From: | Andreas Kaiser | Date: | Tue, 26 Jun 2001 07:22:58 +0000 |
| Subject: | Smarty functions and return value | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-980@lists.php.net to get a copy of this message | ||
Hi,
a question about Smarty functions.
Is it possible to do something like this:
function foo($params) {
extract($params);
if (!empty($test)) {
return eregi("(altavista)", $test));
}
return 0;
}
$smarty->register_function("bot", "foo");
{if bot test=$user_agent }
blafasel
{/if}
Andreas