Nexy Posted June 27, 2008 Share Posted June 27, 2008 Around this site, I see people with code that have: $this => something here; $this => something here; $this => something here; $this => something here; etc.... Just wondering what is it called and any good place I can learn? If it just means greater than or equal to, then I don't understand why people use it this way. D: Link to comment https://forums.phpfreaks.com/topic/112221-solved-what-is-this-something/ Share on other sites More sharing options...
roopurt18 Posted June 27, 2008 Share Posted June 27, 2008 It's $this->something Read the PHP manual on object oriented programming. It's a big topic so I'm just pointing you in the right direction. Link to comment https://forums.phpfreaks.com/topic/112221-solved-what-is-this-something/#findComment-576077 Share on other sites More sharing options...
JD* Posted June 27, 2008 Share Posted June 27, 2008 It's a call to a class. You can read up on them here http://us3.php.net/zend-engine-2.php Link to comment https://forums.phpfreaks.com/topic/112221-solved-what-is-this-something/#findComment-576080 Share on other sites More sharing options...
.josh Posted June 27, 2008 Share Posted June 27, 2008 it's to specify a key/value pair for associative arrays. Example: // keys are a, b, c values are 1, 2, 3 $blah = array('a' => 1, 'b' => 2, 'c' => 3); // using a foreach loop to loop through array elements foreach ($blah as $letter => $number) { echo "key: $letter value: $number <br />"; } Link to comment https://forums.phpfreaks.com/topic/112221-solved-what-is-this-something/#findComment-576084 Share on other sites More sharing options...
Nexy Posted June 27, 2008 Author Share Posted June 27, 2008 Thank You, I'll read up on it. Link to comment https://forums.phpfreaks.com/topic/112221-solved-what-is-this-something/#findComment-576117 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.