Dear all ,
I have php code of the following
<?php
  echo "<SCRIPT LANGUAGE='javascript'>add dd_Employee('".$id1."','".$fname1."',".$sal1.");</SCRIPT>";
 echo "<SCRIPT LANGUAGE='javascript'>add dd_Employee('".$id2."','".$fname2."',".$sal2.");</SCRIPT>";
....
 ?>
...
And My javascript Code Contains
var details=new Array();
function addEmployee(id,fname,salary){
 var temp=new Array(id,fname,salary);
 details[details.length]=temp;
 alert(temp);
}
function displayEmployee(){
 for(var i=0;i<details.length;i++)
        var temp_details=details[i];
//display the id,name,sal        
        var id=temp_details[0];
        var name=temp_details[1];
        var sal=temp_details[2];
        alert(id);
        alert(name); 
        alert(sal);        
}
Now the problem is whatever assigned by the PHP will visble only in AddEmployee,Which means working fine, But Inside the displayEmployee the value assigned by PHP will not work.Any flaw in my logic .Kindly help me