hi all,
how to overload the constructor!!!!!!!
explain with example

<?php

class parentClass  {

  function __construct() {
	// Does all sort of exciting stuff
  }
  
}

class childClass extends parentClass {
  
  function __construct() {
	// Does different stuff
	parent::__construct();  // does the parent stuff as well if needed
	// Does more different stuff if needed
  }
}
?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.