So, I'm using PHP, and I want to echo the HTML and JavaScript below, and successfully creates the textbox and submit button, but it also echos '; ?>, as well, and I've honestly no clue why.

<?php
	echo '
		<form id="searchBar" action="test.php">
			<input type="text" name="query">
			<input type="button" onclick="submit()" value="Search">
		</form>
		
		<script>
			function submit() {
				document.getElementById("searchBar").submit();
			}
		</script>';
?>