Hello

I currently have some inline javascript in a php loop.

To make things simple, here is an example.

<?php
while($loop_data) {
echo $post_id;
?>
<script>
alert("<?php echo $post_id ?>");
</script>
<? } ?>

Is there a way to stop the javascript from being the in the loop?
The reason is because im using a .load function and this stops the script from executing.