Thanks for your posts...
I still cannot get it to work. The following is in a snippet called [[header]]:
<?php
session_start();
include_once('assets/include/server/thefoot.php');
// Page initialisation
$v_error_msg = "";
$THEFOOT->init(); // This function populates a string property with a JSON array
?>
Here is the snippet that I use [[js-cache-images]], to get at the images array:
<?php
echo $THEFOOT->json_images;
?>
In my page template, the first line contains the header snippet call [[header]], then in the <HEAD> javascript section I have:
// Prime the image cache
THEFOOT.o_cache_images = [[js-image-cache]];
Nothing is output from the snippet. I have tried return and echo. However, if I output a constant string such as:
<?php
echo "{\"images\": []}";
?>
.. then it works fine.
In the [[header]] snippet, I output (echo’d) the result of the $THEFOOT->json_images, and I know that the script executes and populates the array. It seems to get lost between the 2 snippet calls. Any ideas?
Thanks, TheFoot