Message Text |
Paul,
I'm inserting the following function in commonfuncs.php :
function replaceemail($email_original) { if ($email_original) { $email_replaced = str_replace('@', '[at]', $email_original); $email_replaced = str_replace('.', '[dot]', $email_replaced); return $email_replaced; } }
The difficulty arises when I call it from the template as:
{FUNC_
REPLACEEMAIL[{LINKEMAIL_COMPANY}]}
The following warning arises: Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'replaceemail' was given in D:\xampp\htdocs\tests\companies\templatefunctions.php on line 115
What can be the cause of this warning ?
Before this I had this function directly inside the template but when somebody inserts a " character a lot of errors arises because of the broken php code, so I want to call the function but not have the code inserted in the template.
Best Regards |