Anahtarında nokta ile smarty dizi

0 Cevap php

Şöyle PHP bir dizi var:

$config['detailpage.var1']
$config['detailpage.var2']
$config['otherpage.var2']
$config['otherpage.var2']
...

Ben yapacağını Smarty erişmek için

$smarty->assign('config', $config);

Bu şablonu ile:

{$config.detailpage.var1}

Unfortunately this does not work, due to the dot in my array key "detailpage.var1", which for Smarty is the delimitor for the array elements. As I don't want to rewrite my config array (cause it is used in many other places), my question is:

Is there any other notation I could use that works with the dots in the array keys? Or can I somehow escape them?

0 Cevap