|
Posted by lorento on 02/06/07 04:30
You can use classes :
<?php
class a
{
include "a.php";
}
class b
{
include "b.php";
}
a::foo();
b::foo();
?>
http://www.mastervb.net/phpbooks/
http://www.mastervb.net
On Feb 6, 3:56 am, Gunnar G <deb...@comhem.se> wrote:
> Hi.
> Another question for you guys, you are very helpful.
> If I have the files a.php, b.php, c.php and I must include them, but they
> all contain the same function foo(), is there a way to tell PHP to call the
> function foo from a.php, foo from b.php , and so on? Or will the last
> included file replace the previous foo() functions?
>
> Any suggestion on a workaround? Can I call afile.php which inclueds a.php
> and runs foo() from a.php?
> Or will I have to rewrite all the files a.php, b.php, etc. ?
> --
> I didn't know sci.bio.paleontology was that low traffic until I tried read
> the thread "Where is everyone?" and found it to be expired.
Navigation:
[Reply to this message]
|