How to use Variable within variable in xenforo Template?

fahad ashraf

Active member
I am passing two variable in view like
$viewParams = array(
'calendar' => $yearCalender,
'currentMonth' => $currentMonth,

calender is array that have html code on each index and currentMonth is integer value when i am trying to access it in template with
{xen:raw $calendar.$currentMonth}
then it giving me error but when i do it like
{xen:raw $calendar.12}
then it works but that is static i want to make it dynamic how can i do it??