Re: [PHP] Re: Error: Can't redeclare already declared function (PHP 3.0.15)

2001-10-27 Thread ~~~i LeoNid ~~
On Fri, 26 Oct 2001 20:54:00 -0400 impersonator of [EMAIL PROTECTED] (Gerard Onorato) planted I saw in php.general: Hi, Another solution I have used when I have to do conditional includes which may cause the same page to be included twice Unfortunately, you can't include FUNCTION()

Re: [PHP] Re: Error: Can't redeclare already declared function (PHP 3.0.15)

2001-10-27 Thread Kodrik
I include files in each other all the time, and some of them might call the same functions (like database functions). I just use a string in all function declaration with the name of the functions or set of functions in the file. if(!$function_test) { $function_test=1; function test() {

Re: [PHP] Re: Error: Can't redeclare already declared function (PHP 3.0.15)

2001-10-27 Thread Tamas Arpad
Unfortunately, you can't include FUNCTION() conditionaly (well, you can, but then you can't use it out of this if():). Why only such dumn restriction, PHP developers? I think it's only true for php3 I use many many class definitions in php4 that are inluded conditionally in another classes'

Re: [PHP] Re: Error: Can't redeclare already declared function (PHP 3.0.15)

2001-10-27 Thread ~~~i LeoNid ~~
On Sat, 27 Oct 2001 13:21:58 +0200 impersonator of [EMAIL PROTECTED] (Tamas Arpad) planted I saw in php.general: Unfortunately, you can't include FUNCTION() conditionaly (well, you can, but then you can't use it out of this if():). Why only such dumn restriction, PHP developers? I think it's

RE: [PHP] Re: Error: Can't redeclare already declared function (PHP 3.0.15)

2001-10-26 Thread Gerard Onorato
Hi, Another solution I have used when I have to do conditional includes which may cause the same page to be included twice At the top of the code to be included (the separate file) put something like: if ($theFileAlreadyInclude != 1) { and at the bottom you may put: }