The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
[TEMPLATE SYNTAX] vb:each from piece of an array
I have an array:
PHP Code:
PHP Code:
HTML Code:
<vb:each from="binaries" value="binary"> {vb:raw binary.subject} {vb:raw binary.binaryid} </vb:each> HTML Code:
<vb:each from="binaries" value="binary"> {vb:raw binary.subject} {vb:raw binary.binaryid} <vb:each from="binary.groups" value="group"> {vb:raw group} </vb:each> </vb:each> Code:
Warning: Invalid argument supplied for foreach() in D:\Sites\vbdev\includes\class_core.php(3917) : eval()'d code on line 142 Does anybody know what would be the correct syntax to use for this (from="binary.groups" is probably incorrect)? Or have I found a vBulletin bug? --------------- Added [DATE]1260659509[/DATE] at [TIME]1260659509[/TIME] --------------- I figured this out. I must use this: HTML Code:
<vb:each from="binaries" value="binary"> {vb:raw binary.subject} {vb:raw binary.binaryid} <vb:each from="binary['groups']" value="group"> {vb:raw group} </vb:each> </vb:each> Just incase anyone is wondering, or searching for the same answer. Thanks to whoever looked. --------------- Added [DATE]1260659823[/DATE] at [TIME]1260659823[/TIME] --------------- That info also comes in handy if you're trying to use any arrays inside of a curly bracket. For example: HTML Code:
{vb:rawphrase {vb:raw item['phrase']}} |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|