heredoc xhtml 1.0 strict page template


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2.  
  3. $content = <<<HTML
  4. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi in sapien interdum purus volutpat placerat. Sed ornare nisi eu magna. Cras vulputate. Phasellus vel lorem vel magna placerat iaculis. Aenean tortor leo, ultricies ut, dictum non, blandit nec, odio. Morbi vel odio. Etiam venenatis turpis suscipit nibh. Suspendisse tincidunt, metus vel consequat gravida, neque enim egestas est, et interdum diam tellus vel lorem. In hac habitasse platea dictumst. Fusce vitae velit. Suspendisse a libero et risus imperdiet tincidunt.
  5. HTML;
  6.  
  7. $html = <<<HTML
  8. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  9. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  10. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  11. <head>
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  13. <title>title</title>
  14. <link rel="stylesheet" href="./css/screen.css" type="text/css" media="screen" />
  15.  
  16. </head>
  17. <body>
  18. <div id="wrap">
  19. $content
  20. </div>
  21. </body>
  22. </html>
  23. HTML;
  24.  
  25. echo $html;
  26.  
  27. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.