var data1 = {rss_source1: ‘{$myvars.myvariablename}’};
function app()
{
this.myfeed = data1.rss_source1
// this.myfeed= “data1.rss_source1”
}
[/PHP]
As we know PHP executes before the page is loaded and I have defined var to read Smarty variable. Issue is that PHP has already been parsed when JavaScript runs. Both options will not work. How to solve this issue?
Storing them as properties of an object.
[PHP]
var data1 = {rss_source1: ‘{$myvars.myvariablename}’};
[/PHP]