Hi,
I have problem with varible printing inside javascript.
varible htmlString printing not working: document.write(htmlString)
<?php  $htmlString= htmlspecialchars(file_get_contents('http://google.com'));?>
<html>
  <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <script type="text/javascript">  
      var htmlString="<?php echo $htmlString; ?>";
      document.write(htmlString);
    </script>
  </body>
</html>
Edit:
Webpage source result: - Get all google.com inside htmlString the var not printed on the page(I cut the all content of htmlString because its very long)
<html>
  <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <script type="text/javascript">  
      var htmlString="<!doctype html><html><head><metahttp-equiv="content-type" cotring)";
   document.write(htmlString);
    </script>
  </body>
</html>
Thanks