How do I pass the value of a PHP variable to a javascript in separate file
I have a PHP file: test.php
<?php
$x = 20;
?>
Now I have a separate html file with javascript: test.html
<html>
<head>
<script>
//Here I want to check if value of $x in PHP is 20 and print accordingly
//How do I pass the value of $x from the php file to this html file?
</script>
</head>
</html>