Tech_View
asked on
PHP Error : Connot Access Empty Refrence
Hello. I am not familiar with PHP. I have an error: Connot Access Empty Refrence.
My Code is:
<?php
class Student{
var $name;
function Student($n){
$this->$name = $n;
}
function sayHello(){
$
print $this->$name";
}
}
$std1 = new Student("reza");
$std1->sayHello();
?>
Help please.
My Code is:
<?php
class Student{
var $name;
function Student($n){
$this->$name = $n;
}
function sayHello(){
$
print $this->$name";
}
}
$std1 = new Student("reza");
$std1->sayHello();
?>
Help please.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I still have an error, maybe my mistake, I will try again....
ASKER