so in such situation you lose the javascript highlight syntax, to me it looks like there are some cases were youre obliged to put the Js in a php string (for example when working on some ajax stuff and php mysql request), how you do? i found very annoying to work js this way
echo '<script>
$(function(){
$("select#discipline_").change(function(){
var selected = $("select#discipline_ option:selected");
$.ajax({
url: "valider.php?discipline_val="+selected.val()+"&action=specialite",
success: function(response){
$("span#specialite").html(response)
if( selected.val()=="0" ){
$("select#specialite_").hide()
$("span#add").hide()
}
else{
$("select#specialite_").css({width:"0px"}).animate({width:"204px"}, 300).fadeIn()
$("#add").show()
} } } ) } )
})</script>';