I am trying to push to the javascript array after looping 200 times through the member array to push every member that matches the department selected description into the javascript array., However it fails
<? $i = 0 ;
while( $i < 200)
{
if ($members[$i]['department'] == $depttts){
break;
echo "<script type='text/javascript'>contacts.push({"NAME":"SirSaula","TITLE":"John","CONTACT":"bab","RESEARCH":"Ph.D."});</script>";
}
else {
$i++;
}
}
?>