+ 2

why we are using $this

$this

21st Jun 2018, 8:45 AM
Prashanth Goud
Prashanth Goud - avatar
6 odpowiedzi
+ 4
KrOW is correct. You can read the lesson to understand it better. https://www.sololearn.com/learn/987/?ref=app
21st Jun 2018, 9:08 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
+ 2
I dont know much of PHP but if i remember good $this its a reference to current object inside class methods
21st Jun 2018, 9:06 AM
KrOW
KrOW - avatar
+ 1
$this ->name =$name; explain please
21st Jun 2018, 8:53 AM
Prashanth Goud
Prashanth Goud - avatar
0
$var ="var"; use to store variable
21st Jun 2018, 8:50 AM
Sudarshan Rai
Sudarshan Rai - avatar
0
Thank u bro
21st Jun 2018, 9:06 AM
Prashanth Goud
Prashanth Goud - avatar
0
thanks bro
21st Jun 2018, 9:09 AM
Prashanth Goud
Prashanth Goud - avatar