On my PHP script, I have an array similar to this:
$panorama = array(
"default" => array(
"firstScene" => 2,
"author" => 'Felipe'
),
"scenes" => array(
"circle" => array(
"title" => "Title 1",
"hotSpots" => array(
"pitch" => "-2.1",
"createTooltipFunc" => "hotspot"
)
)
)
);
This array will be passed to a Javascript funcion, as a json object, like this:
pannellum.viewer('panorama', <?php echo json_encode($panorama); ?>);
The parameter createTooltipFunc have to receive a callback function named hotspot. So, in the final json, when I pass this PHP array to the Javascript function, this parameter should be like this: "createTooltipFunc" : hotspot, without the double quotes. How do I do that?
Just to give more information, I'm trying to create a tour using the plugin pannellum.js and I'm geting all the info of the json I need from my mysql DB.