I am trying to write a javascript inside php tags my javascpript is here
<script>
$('#img').attr("src","getImage.php?id="+);
$('#img').show();
</script>
and what I am doing is here
<?php
echo "<script>";
echo " $('#img').attr(\"src\",\"getImage.php?id=\"+1); ";
echo " $('#img').show(); ";
echo "</script>";
?>
what is wrong here?