This tutorial will teach you how to use classes with PHP. This can be very usefull for creating a huge script without all of the messy and long work.
The Class File
The Test FileCode:<?php /* * Tutorial Created By GFXVOID * * All Rights Reserved * */ // // Start New Class // Class Test { // // This is a Classes Function // function showText( $text ) { *return '<b>'.$text.'</b>'; } } // // End Class // ?>
Example HereCode:<?php /* * Tutorial Created By GFXVOID * * All Rights Reserved * */ // // Include Class File // include "class.php"; $newClass = new Test(); // // Use the Class in the Script // echo $newClass->showText( "Hello Word" ); ?>