Question : Convert html pages into PHP

What is the best way to convert html pages into PHP?(not batch, 8-10pages)
HTML pages intensively use scripting, contains many javascript code blocks and special ascii symbols. There is various online converters that parse html and add return with echo, return with echo for every line, or return with echo for every line + '\n', like this:

<?php echo
"<html>
<body>
test</body>
</html>"; ?>

echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN'>";
echo "<html>";
echo "<head>";
echo "</head>";
echo "<body>";
echo "</body>";
echo "</html>";

<?php
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n";
echo "<html>\n";
echo "<head>\n";
echo "</head>\n";
echo "<body>\n";
echo "</body>\n";
echo "</html>\n";
?>

is there desktop utilities for this purpose also?

Answer : Convert html pages into PHP

Yes, sure; that is is fine.  Heredoc and nowdoc syntax just make it easier to read and edit later though:

<?php

if ($UAinfo['browser'] == "MSIE" AND $UAinfo['browser_version'] < 7){
      $pagename = "ver005";
      $pages[] = "

echo <<<EOS
<html>
  <head>
    <script>
    </script>
  </head>
  <body>
    <span id=""></span>
  </body>
</html>
EOS;


            } catch(e) {}
            %NextPageVers%
      }
      ";
}

?>
Random Solutions  
 
programming4us programming4us