[wd_asp elements=’search’ ratio=’100%’ id=1]

Basic OOP structure PHP class-function

14th September 2014

Php - Miscellaneous

php codehaven

num+2;
}

}/*** end of class ***/

/*** Instantiate a new class instance ***/
$math = new mathematics;

/*** set the value of the number ***/
$math->num = 2;

/*** call the addTwo method ***/
echo $math->addTwo();

?>