I'm really new to PHP classes and I was just wondering how to access functions within a PHP Class.
For example:
<?PHP
$cn = "myClass";
$myClass = new $cn;
class myClass
{
function __construct()
{
doSomething(); // ?
}
private function doSomething() {
echo "doSomething accessed!<br />";
}
}
?>
How would I access doSomething()
within the class? Any help would be much appreciated.