Hiya, It would be useful for me to be able to use a class within another class and I don't know if that's permissable in PHP.
Here's an example of what I'm trying to do. Is it just simply not permitted or am I going about it the wrong way? Thanks in advance for any help, Dave Code follows: ===================================================================== class CSSFont { var $family ='Arial'; var $size ='12pt'; var $style = 'none'; function Output() { $out = "\n"; $out .= "font-family:".$this->family.";\n"; $out .= "font-size:".$this->size.";\n"; $out .= "font-style:".$this->style.";\n"; return $out; } } class CSSBorder { var $font1= new CSSFont; var $font2= new CSSFont; function Output() { $out = $this->font1->Output(); $out .= " other stuff goes here "; $out .= $this->font2->Output(); } } ===================================================================== --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php