pplNet Posted September 11, 2008 Share Posted September 11, 2008 Hi all, I am totally confused about this thing "->".... I know it appear during we call records like $resource->field we also use it in class method. But in some cases I saw ppl use it in Array... So, what is the meaning of "->"??? when we use it? how we use it? I found this from Joomla code $arr[$i]->$key; Please explain if anyone know. Thanks for everyone! Link to comment https://forums.phpfreaks.com/topic/123803-when-only-we-use-it/ Share on other sites More sharing options...
Mchl Posted September 11, 2008 Share Posted September 11, 2008 That's probably because $arr is an array of objects. Link to comment https://forums.phpfreaks.com/topic/123803-when-only-we-use-it/#findComment-639210 Share on other sites More sharing options...
BlueSkyIS Posted September 11, 2008 Share Posted September 11, 2008 that's what i was thinking. then $key is a method for that object. $object->obj_variable_or_function $array_key=>$value Link to comment https://forums.phpfreaks.com/topic/123803-when-only-we-use-it/#findComment-639211 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.