The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Multi-dimensional arrays in templates.
If I have a multi-dimensional array, how would I go about using it in a template?
For example, let's say I have a regular array of Userinfo. I know that I can get the musername simply by: {vb:raw userinfo.musername} Now let's say I have an array called $users. This array has key => value as User ID => Userinfo Also, let's say I have a variable called $userid. How would I get the value of $users[$userid]['musername'] in a template? Would it be as simple as {vb:raw users.{vb:raw userid}.musername}? --------------- Added [DATE]1308564538[/DATE] at [TIME]1308564538[/TIME] --------------- I've found this post by cellarius that says that multidimensional arrays do work in templates, but it doesn't give a example (or say it's even possible) to do something like I mentioned--that is, using a variable as one of the keys of an array. |
#2
|
|||
|
|||
I have this example how to get the multidimentsional
Example ARRAY: PHP Code:
Hope it helps. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|