21278 Posts in 5728 Topics by 2599 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 856 Views |
-
show data in template???

19 December 2008 at 6:14am
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..
| 856 Views | ||
|
Page:
1
|
Go to Top |

