Re: custom functions

From: Date: Thu, 21 Feb 2002 20:15:01 +0000
Subject: Re: custom functions
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2820@lists.php.net to get a copy of this message
Heloo, I'm reading with interest this thread, and I have a remark and a question 1- remark ========= The following is clear concrete and very easy to understand and might perhaps be added to: http://www.phpinsider.com/php/code/Smarty/docs/x1215.htm#AEN2057 At 11:17 21/02/02 +0100, Ivo Jansch wrote:
That's because of the way Smarty passes params to you. If your function is normally this: function func_getimage($path) { // lalalalala... } then when using it in smarty, change it to this: function smarty_func_getimage($params) { $path = $params["path"]; // lalalalalala }
2- Question ========== What are the pro and cons of such a custom function versus a classical function placed in the *.php file ? Luc

« previous php.smarty.general (#2820) next »