ejaboneta Posted February 3, 2010 Share Posted February 3, 2010 Whats the difference? I've been googling this with no luck. I might just not know how to word what I mean to google. $foo[bar] - or - $foo->bar Quote Link to comment https://forums.phpfreaks.com/topic/190836-variablethis-vs-variable-that/ Share on other sites More sharing options...
mikesta707 Posted February 3, 2010 Share Posted February 3, 2010 The first example is the syntax for an array, while the second is for an object. 2 different data structures Quote Link to comment https://forums.phpfreaks.com/topic/190836-variablethis-vs-variable-that/#findComment-1006365 Share on other sites More sharing options...
Mchl Posted February 3, 2010 Share Posted February 3, 2010 First is an array: http://www.php.net/manual/en/language.types.array.php Second's an object: http://www.php.net/manual/en/language.types.object.php Quote Link to comment https://forums.phpfreaks.com/topic/190836-variablethis-vs-variable-that/#findComment-1006366 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.