OO style:
class fooBar
{
function fooBar()
{
// Code here gets executed as soon as the fooBar class is called.
}
function someFunc()
{
// Some code here to do something.
}
}
Now to call that function from the fooBar class:
$foo = new fooBar; // Create a new instance of the fooBar class.
$foo->someFunc(); // Call the someFun function from the above class.
This is a very brief idea of how the OO style works..
For further (and more detailed) info I highly reccomend you read this
section of the PHP manual:
Classes and Objects
http://www.php.net/manual/en/language.oop.php
Hope this helps..
Regards,
Chris
> Hi there i have a very good understanding of methods an fucntions as a
>matter of fact i have created a methods or functions library that i
>used, for almost all the situations that i need.
>So how can i make the next step to OOP