On 18 Apr 2008, at 13:09, Robert Castley wrote:

In my layout.phtml file I have:

<?php  echo $this->doctype('XHTML1_STRICT'); ?>
<html>
  <head>
<?php echo $this->headLink()->appendStylesheet('css/' . $this- >css . '.css'); ?> <?php echo $this->headMeta()->appendHttpEquiv('pragma', 'no- cache'); ?>
  </head>
  <body>

But the source in the browser is not nicely formatted i.e. no EOL

E.g.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd "><html>
  <head>
<link href="css/magik.release.css" media="screen" rel="stylesheet" type="text/css" /> <meta http-equiv="pragma" content="no-cache" /> </head>

  <body>


PHP "swallows" the new line if ?> are the last characters on the line. Yyou can add a space to the end of the line after the ?> to get nicely formatted HTML.

Regards,

Rob... 

Reply via email to