Ok, I know I'm overlooking something REALLY easy here, but I'm stumped as to what.
I have a file called makemenu.php which I must call repeatedly from another file. I do so as follows:
include "makemenu.php";
The problem is that a function called WriteMenu within makemenu.php gets redeclared and comes up with the error: Cannot redeclare writemenu() (previously declared in...
When I add the code:
if (!function_exists('WriteMenu'))
{
}
to my code, instead of processing it the first time & ignoring it the second, I get this error: Call to undefined function WriteMenu() ...
Help! I really MUST be able to call this file over & over again in a loop. I'd prefer to have it in a separate file rather than having it hard-coded into the calling file, as I call it from other files as well. Any ideas?