How to check the screen and output php?

the <script>
 var html = document.documentElement;
 if(html.clientWidth > 1200) {
 document.write([<div class="maps"><?= $ord->maps ?></div>]);
}

 </script>


Code is not working where is the error? I'm trying to hang out the map.
July 4th 19 at 23:00
1 answer
July 4th 19 at 23:02
Try this:

document.write('<div class="maps"><?= $ord--->maps ?></div>');


+ check that the condition if(html.clientWidth > 1200) - runs

Find more questions by tags PHP