I'd like to control exactly the indentation of my HTML that's generated by PHP but I'm unable to remove some of it. An example is this HTML source code:
<table id="structure">
<tr>
<td id="navigation">
<p>Hello!</p> </td>
Why are the <td>
and <p>
lines indented like this? Can I modify that?
The main PHP that generated it was
<table id="structure">
<tr>
<td id="navigation"><?php echo navigation($data_page,$data_subj);?>
and the "navigation" function starts with
function navigation($data_page,$data_subj){
$output = "<p>Hello!</p>";
return $output;
}
(The real navigation is a <ul>
with <li>
elements containing <ul>
's in turn and I'm trying to render it readable in the HTML source code by adding and
\t\t
for indentation levels.)
For new line try ' '. The sign for new line is depends on your file encoding and the operating system you are using.