When you are using classes the :: notation is used to allow you to access a method of another class without having to create an instance of that class. here's an example:
class title
{
function title($msg='')
{
$this->title = "Welcome";
$this->user_name = name::show_name;
$this->title .=$this->user_name
return $this->title;
}
}
class name
{
function name()
{
}
function show_name($name)
{
$this->name = $name;
return $this->name;
}
}
So in the above example you are accessing the method of show_name from the name class without having to actually instantiating the name class.
HTH
GM
Originally posted by neg9
Okay.. stupid question time.....
While working with classes, what is the :: used for?
I was going to type what i think it does, but i just put actual thought into it and decided i am waayyy off base.