hi
i want to pass variable from php to javascript.i want to pass my group[name please tell me.the current code is not working
<?
session_start();
require_once('common/dblayer.php');
$db=new dblayer();
$id=$employer_id;
$empid=$db->getgroupname($id);
$groupname=$empid[0]["group1"];
echo $groupname;
?>
javascript code
//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="employercp.php">Job Portal</a>'
menu1[1]='<a href="cggroup.php?id=<? echo $groupname; ?>">Groups</a>'