Re: Is this possible

From: Date: Thu, 06 Jun 2002 14:33:31 +0000
Subject: Re: Is this possible
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-100933@lists.php.net to get a copy of this message
On Thu, Jun 06, 2002 at 05:32:45AM -0000, James Edgar wrote: > class myClass > { > function myFunc($var) > { > include("xml.inc"); > $obj = new xml($data,"xml"); And what happened when you ran this? Why not tell us? In the future, please post error messages and/or results so we can help you more accurately. If you ran it, it'd probably say "Class declarations may not be nested." Pretty clear. The code for your xml class outside of myClass. But, you can create the object inside the class. So, put include('./xml.inc'); before class myClass and leave $obj = new xml($data, 'xml'); where it is. Enjoy, --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

« previous php.general (#100933) next »