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
Code:
<?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
//

?>
The Test File
Code:
<?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" );

?>
Example Here