This is a discussion on "Assigning to $this" within the PHP Forum section. This forum, and the thread "Assigning to $this are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Assigning to $this
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Assigning to $this
In making the switch from 4 to 5, this is the only problem I have run into so far. Throws me an error, cannot re-assign $this. What do I do?
|
|
|
|
#2
|
|||
|
|||
|
Re: Assigning to $this
How about showing us some code?!
|
|
#3
|
|||
|
|||
|
Re: Assigning to $this
|
|
#4
|
|||
|
|||
|
Re: Assigning to $this
Sounds like the $this variable is read-only or a constant.
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
#5
|
|||
|
|||
|
Re: Assigning to $this
$this is used to access variables or functions within the current class.
Basically, it's a word reserved for OOP, hence you can't assign it as a variable name. |
![]() |
| Tags |
| this php4 php5 |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Assigning "names" to dynamically created Sprites | DocBoy52 | Flash & Multimedia Forum | 1 | Nov 23rd, 2007 15:54 |
| Assigning a value to Hidden Type. | thanawala84 | Web Page Design | 1 | Oct 13th, 2007 08:10 |