Marc
Well-known member
Hi Peeps,
I am a very new coder in PHP and attempting a decent addon for xenforo. Reason I am doing so is I will learn a lot about both PHP and the framework as I go alone (at least thats the theory LOL). However I am struggling with something I need to do with some arrays.
Here is the scenario. I have an array with values like so:
I need to get the avatars for the users, so was going to use
So .... Here is my dilema. I cant figure firstly how to pass only a list of the users into the array from what I have above, and secondly how to then merge that into the original array as 'avatarURL'=>'blah'
Really hope that makes sense. I could start looping through things etc etc, but Im sure there must be a better way of doing this.
Any help would be greatly appreciated.
I am a very new coder in PHP and attempting a decent addon for xenforo. Reason I am doing so is I will learn a lot about both PHP and the framework as I go alone (at least thats the theory LOL). However I am struggling with something I need to do with some arrays.
Here is the scenario. I have an array with values like so:
PHP:
array(array('user'=>1,'something_else'=>2,another_item=>26),
array('user'=>18,'something_else'=>4,another_item=>26),
array('user'=>5,'something_else'=>3,another_item=>26))
I need to get the avatars for the users, so was going to use
PHP:
XenForo_Template_Helper_Core::getAvatarUrl($anArrayOfUsers,'m');
So .... Here is my dilema. I cant figure firstly how to pass only a list of the users into the array from what I have above, and secondly how to then merge that into the original array as 'avatarURL'=>'blah'
Really hope that makes sense. I could start looping through things etc etc, but Im sure there must be a better way of doing this.
Any help would be greatly appreciated.