This is probably something very basic, but I searched for its meaning for a while now.
What is this ->
I saw this in an example script, $this->
what does this mean, im sure its something simple and i should know this. :)
This is probably something very basic, but I searched for its meaning for a while now.
What is this ->
I saw this in an example script, $this->
what does this mean, im sure its something simple and i should know this. :)
No its not Fowbers its foobers :D
$this-> is used in what is called a class, which is the build block of OOP (Object Oriented Programming). Basically a class is a set of functions and variables that work together. It allows for easily doing a task without needed to know how it works, just what functions need to be called and (possible in a certain order). This is the idea of OOP, being able to use certain reusable code without needing to know what exactly how a group of functions work together, just what the functions do and do together.
That being said, to explain what $this is. Basically its just a reference to a calling object, the object being a variable in your script that is declared as an object of the class. It is hard to explain more exactly without you having an example of a class infront of you.
Here is a example on php.net
http://us2.php.net/manual/en/ref.classobj.php
If you need further clarification I can try to explain a little more in depth, but for a really simple answer, its a object variable used in classes
Register/Login Script
Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script
No worries watdaflip i fully understood what you just said. Thnx for clearing it up for me. Thnx for your help :)
No its not Fowbers its foobers :D
There are currently 1 users browsing this thread. (0 members and 1 guests)