|
Im trying to do a class layout for a php file, and to create a function in the include file for an entire javascript block using php-nuke. the problem is that javascript block includes instances of functions from the same include file (instancing occurs in the root file). how do i call this instance variables?
here is a parcel of the code (function) in the include file :
function Get_Map(){
$content .= "<script type=\"text/javascript\">\n";
$content .= "var gme_map;var gme_markers=[];var gme_genres=[];\n";
$content .= "if (GBrowserIsCompatible()) {\n";
$content .= "gme_map = new GMap(document.getElementById(\"map\"));\n";
/* the instance variables should be called here */
$content .= "gme_map.addControl(new GLargeMapControl());\n";
$content .= "gme_map.addControl(new GMapTypeControl());\n";
$content .= "}\n";
$content .= "function addGMarker(markerNo, lng, lat,genre){\n";
$content .= "var marker = new GMarker(new GPoint(lng, lat));\n";
i just started studying php and it would be really helpful if somebody could give me some idea about this problem. thanks~~
|