So I'm returning an array of all the information I need from my function, but I can't seem to figure out how to parse through the array once I get to the template.
Module:
Class main{
function data(){
blah blah blah
return $array;
}
}
Template:
{exp:main:data}{data}{/exp:main:data}
{data} returns “Array”
How can I parse through this in EE code or is there another to parse this variable?
I have also gone down another path which follows:
Module:
Class main{
function data(){
blah blah blah
$this->return_user(14);
}
function return_user($var){
return '<p>'.$var.'</p>';
}
}
Template:
{exp:main:data}{exp:main:return_user}{/exp:main:data}
{exp:main:return_user} returns <p></p>
, but not <p>14</p>
.
Any ideas?