Class in PHP is very useful tool. Using classes is object-oriented part of php. Simple sample: Create class.php and write this code there: class myobject { function f1 ($variable1,$variable2); { echo $variable1.' - '.$variable2; } } Then create index.php file and place this code there: include("class.php"); mynewobject=new myobject(); $mynewobject->f1('Name','Surname'); The resut will be such: Name - Surname