How do I get access to php variables in Joomlas approach to integrate Javascripts with addScriptDeclaration?
$document = JFactory::getDocument();
$variable = "test";
$document->addScriptDeclaration('
jQuery(document).ready(function () {
var simple = "<?php echo $variable; ?>";
alert(simple);
});
);
The classic form of integrating php variables won't work.