Ok, I've got a class but I'd like to be able to get the object variable assigned to it - from the class?
An example may help my poor description:
<?
class myclass
{
function myclass()
{
echo "This class is assigned to $className";
}
}
$class1 = new myclass();
$class2 = new myclass();
?>
Ok, the above would print out:
This class is assigned to class1
This class is assigned to class2
Soo, any ideas how I can do that? (atm, I'm passing the name across manually as a parameter in the constructor, but this is messy IMO.
Thanks.