This is a discussion on "Silly Question" within the PHP Forum section. This forum, and the thread "Silly Question are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Silly Question
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Silly Question
This seems like a silly question. In all the PHP scripts I've written I can't ever remember using -> I'm assuming this is an assignment operator? Does any one have a quick answer to this? I sure would appreciate it. Thank you in advance.
Scott |
|
|
|
|||
|
Re: Silly Question
The -> operator runs the method named on the right of the operator on the object named on the left. Thus
$old = $ourfirstdog->getage(); "run the getage method on the object stored in $ourfirstdog and return the result into the variable $old" |
|
|||
|
Re: Silly Question
Ok,thank you, thats kinda what I was thinking. Just wanted to clarify.
|
|
|||
|
Re: Silly Question
read up on OOP regarding PHP, its used for objects.
THANKS ANDY!!! - teesside website design - website design in teesside - |
![]() |
| Tags |
| php operator |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Silly Golf | jimboready | Free Web Site Critique | 2 | Feb 29th, 2008 13:57 |
| Help!! A silly Question | nutbolt | Flash & Multimedia Forum | 4 | Feb 7th, 2007 16:30 |
| [HELP] XSL silly question | windbizz | Other Programming Languages | 1 | Oct 3rd, 2006 06:54 |
| Probably a VERY silly question but... | dharma | Web Page Design | 6 | Sep 4th, 2006 10:33 |
| very silly and easy question | saltedm8 | Web Page Design | 2 | Aug 22nd, 2006 22:35 |