Hi!
I write a function (function that is call after printing search button) that return me an array $rec like this:
Array
(
[0] => Array
(
[nome] => prova 1
[tipologia] => 1
)
[1] => Array
(
[nome] => elisa
[tipologia] => 1
)
)
this is a part of my function. How can show data in template?
If I write $PrintName and $PrintTipo I have errors.. sorry but form me is a big big problem show data in template with silverstripe..
$dos = new DataObjectSet();
for($i=0; $i<count($rec);$i++)
{
print_r($rec[$i]['nome']);echo '<br>'.'<br>';
$dos->push(new ArrayData(array("PrintName"=>$rec[$i]['nome'],"PrintTipo"=>$rec[$i]['tipologia'])));
}
//var_dump($dos);die;
return $this->customise($dos)->renderWith(array('SearchPage_results', 'Page'));
thanks for help..