I want to pass array value directly into the js fucntion which in loop and wanted to retrieve its query string id of selected
employee here is code
as i said in loop i wanted to pass array value
while($row = mysql_fetch_array($res)){
echo "<tr>".
"<td> <p><button onclick=func({$row[0]}) >View</button></p> </td>"
."</tr>";
Here is js fucntion
<script>
function func()
{
var jsvar = <?php echo json_encode($row[0]); ?>;
window.open("window.php"+jsvar,'Eployee Details','width=545,height=326,resizable=yes,scrollbars=yes,status=yes');
}
</script>