i want use PHP to write output <script></script> tag. i use code:
<?php
echo "test";
echo "<br>";
echo '<script src="http://mywwebiste./mycode.js" type="text/javascript"></script>';
?>
I want it will show:
test
<script src="http://mywwebiste./mycode.js" type="text/javascript"></script>
But it only show test
Just use
$script = '<script src="http://mywwebiste./mycode.js" type="text/javascript"></script>'
echo(htmlspecialchars($script));