0
Something wrong with my code
Please can anybody check why i am getting error; <?php class Student_record{ public $name; public $stream; public $gpa; public $project; function__construct($Name,$Stream,$Gpa,$Project){ $this->$name=$Name; $this->$stream=$Stream; $this->$gpa=$Gpa; $this->$project=$Project; } function_Hashonars(){ if(this->$gpa>4){ echo $this->name" has got honars"; }} } $student_record1= new Student(Harsh,IT,3.5,"Php backend") $student_record1->_Hashonors(); phpinfo(); ?>
2 Answers
+ 2
Can you send this as code so that I can workout.
0
Many problem was found : )
Please refer to and compare with this edited version to see what was wrong
https://code.sololearn.com/wp30pql4Khs6/?ref=app