By: Anonymous
Date: 2004-11-29
Time: 17:02
|
Functions
hello :)
I'm getting this msg when i try to use a function in MergeField:
TinyButStrong Error (MergeField Method): Custom function 'dsa' is not found.
i'm using this:
$tpl->MergeField('stars',sub_stars($subID),TRUE);
and the function is something like this:
function sub_stars($sub_id)
{
global $db;
// db code here ...
if($sub_rating == 5.0)
{
$star = "dsa";
}
return $star;
}
What am i doing wrong?
Ps: sorry for my bad english :)
|
By: Skrol29
Date: 2004-11-29
Time: 17:18
|
Re: Functions
Hello,
Your MergeField call is not good.
It should be:
$tpl->MergeField('stars','sub_stars',TRUE);
|