The df_display() method takes 2 parameters. The first is an associative array of variables to be sent to the template for use.
e.g.
- Code: Select all
$context = array(
'foo'=> 'The Foo Value',
'bar' => array('firstname'=>'Steve', 'lastname'=>'Hannah')
);
df_display($context, 'my_template.html');
Then in my template :
- Code: Select all
<p>The Foo value is {$foo}.</p>
<p>Hello {$bar.firstname} {$bar.lastname}</p>
This would render like:
- Code: Select all
<p>The Foo value is The Foo Value</p>
<p>Hello Steve Hannah</p>
Extrapolating from this, you can see that if you have multiple database results stored in arrays, you could just pass them both to the template context in their own variables.