View Single Post

  #3 (permalink)  
Old 09-28-2005
Colin McKinnon
 
Posts: n/a
Default Re: Accessing multiple same-named functions

Henk van Winkoop wrote:

> Hello,
>
> In my 'Main.php' I automatically include 3 different car company files
> (companies A, B and C) by some filesearch function.
> A.php
> B.php
> C.php
>
> I want to calculate the lowest car price per company and display that
> company name.
> I want to add a new company simply by creating file 'D.php'.
>


You're barking up the wrong tree here.

While (as Ivan suggested) you could use derived classes, or you could
implement the different companies as differetn URLS and use
file_get_contents() (or similar) to retrieve the results, a proper solution
would describe the differences in data and use the same code to process the
request.

C.
Reply With Quote