Monday 19 December 2011

How to send array from action to template in symfony?


Suppose we have testArray given following:

$this->testArray = array('ashwani', 'bablu','cintu');
$myArray = $sf_data->getRaw('testArray');
print_r($myArray);

Output will be in template file:

Array
(
    [0] => 'ashwani'
    [1] => 'bablu'
    [3] => 'chintu'
)


Cheers!

No comments:

Post a Comment