var s = this
Going the other way, with what I’ve currently got, if I have a simple PHP array like;
$a = array('x','y');
'new Function('var a = new Array();a="x";a="y";return a');'
// Creates a function object
unserializedDataFunc = eval(serializedData);
// Get back the data from the function object
unserializedData = unserializedDataFunc();
Another thing proving tricky is mapping PHP arrays, which can be both indexed and associative e.g.;
$a = array('x','y','z','a'=>1,'b'=>2);
var a = new Array();
a["a"] = 1;
a["b"] = 2;
The general mission here, BTW, is a simple mechanism to get XUL talking to PHP.