Jump to content

defining simple classes to take parameters..


jaunty_mellifluous

Recommended Posts

echo "bitches" . "<br />";

class classname

{

		function _contruct($param)
		{
			echo "Contructor called with parameter ".$param;
		}

}

$a = new classname("First");
$b = new classname("Second");

 

 

I'm trying to run this code but it's not giving me any output.

 

Output should be very simple, e.g, Constructor called with parameter First.

 

Please help.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.