[oclug] PHP instance name -lunch theme

Joe Burpee jeb at burkby.com
Fri Jun 18 06:03:47 EDT 2004


On Thu, Jun 17, 2004 at 12:27:30 -0400, todd.clattenburg at sdc-dsc.gc.ca wrote:
> That's a drag, it seems that:
> 
> $pepperoni = new topping("pepperoni","crispy and spicy"); 
> 
> is completely redundant. 
 
The redundancy may be reduced with something like
  $$name = new topping($name, $description);

Here $name contains one of the names, and $description the corresponding
description.  E.g. you could loop through an array indexed by name.

Joe




More information about the OCLUG mailing list