17
How to print indented code when I give one echo
by PHP?
let’s say the structure is like this:
echo
'<div>'.
'<table>'.
'<tr>'.
'<td>'.
'</td>'.
'</tr>'.
'</table>'.
'</div>';
when I go to see in the source code of the page, PHP ends printing the result in a row.
<div><table><tr><td></td></tr></table></div>
there’s like imprint it indented in the source code?
How’s your code in PHP?
– Vinicius
updated with the modification
– chocolatemontana
you do not need to concatenate all lines, leave only the first and last quotes and remove the points
– Vinicius
The space before the
'
is not identado, should be' <table>'.
– Papa Charlie
You have checked if something in your application does not do this automatically?
– Sr. André Baill
@chocolatemontana Take a look at [tour]. You can accept an answer if it solved your problem. You can vote on every post on the site as well. Did any help you more? Need something to be improved?
– Maniero