First I am a very less expierenced in PHP programming. My "problem":
I developed a UDT which contains a function. When I call the UDT more than once on a page I get "Cannot redeclare ". I guess the function is included more than once. include_once() or require_once() should solve the problem but I do not want and have not the knowledge to alter the core files.
I used a workaround like:
Code: Select all
if (!function_exists("<func-name>")){
function <func-name>($parameter){
....
return $result;
}
}
Is there a more elegant way to solve the problem? Thankx.
Hani