I'd like to mix php with javascript Here is my code:
<?php
function sayHi(){
 echo 'Good Morning';
}
echo 'hello';
for($i=0;$i<10;$i++){
?>
<script>
    document.write('bingo');
    <?php
  sayHi();
 }
 ?>
</script>
It stopped working when it finished echo 'hello'; How can I make it work fine? could you please help me
 
     
    