Quote:
Originally Posted by Shadab
Not a problem!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Another note; on multidimensional arrays...
Suppose you have a nested / multidimensional array set, like:
PHP Code:
// Array declaration & assignment
$multiDim = array( 'level1' => array( 'foo' => 'one', 'bar' => 'two', 'baz' => 'three', 'qux' => 'four' ), 'test' => 'testval' );
// Variable Registration
vB_Template::preRegister( 'header', array('multiDim' => $multiDim) );
You can chain the array 'keys' like in the second example:
HTML Code:
{vb:raw multiDim.test} <!-- Output: testval -->
{vb:raw multiDim.level1.baz} <!-- Output: three -->
|
I have extended my example to provide for multidimensional arrays. Thanks for pointing this out