I have smarty array in my calendar.tpl file.i'm trying to send that array in to javascript.but i dont know how to do it.
php file
public function hookDisplayCarrierExtraContent()
{
$DeliveryWeek=new DeliveryWeek();
$resul=$DeliveryWeek->getweekday();
$this->smarty->assign(array('WeekVal' => $resul));
return $this->display(__FILE__, 'views/templates/front/calendar.tpl');
}
calendar.tpl
<div class="block_content">
{$WeekVal}
</div>
<script type="text/javascript">
var arry= // get smarty array
</script>
------Update---------
Solution for me you can get array as text in .tpl
<div id="grabMe">{$WeekVal}</div>
<script type="text/javascript">
{literal}
var arry= $("#grabMe").text();
{/literal}
</script>