Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End What do you call php variables like this: $this->hello Re: What do you call php variables like this: $this->hello

#64324
Rob MacKay
Participant

yup the guys above are right – you could set up a new object by assigning for example a class you made to connect to a database…

$this = new connection();

connection is the class you are accessing – inside the class are the functions – (well methods if they are inside a class – but hey…)

you can then access the functions/methods via the "->"

$this->addNew();

if you see "=>" that is what defines a key within an array – it can be a little double take-ish when you first see it though…