Link to home
Start Free TrialLog in
Avatar of ucsdmbdm
ucsdmbdm

asked on

Make PHP echo out the html in clean format

Hi,

This might be a very simple question but I am not sure how to use PHP to echo out html in a very clean format.
Every time I use php to print out html element, I get sth like:
<div class="usercontent" style="display:block;">  
               <div id="dcdiv" style="background-color:#f3f3f3;  " ><form method="post" action="./../processrequest.php"><input type="hidden" id="req_type"" name="req_type" ..

But I would like to get sth like:
<div class="usercontent" style="display:block;">  
               <div id="dcdiv" style="background-color:#f3f3f3;  " >
                            <form method="post" action="./../processrequest.php">
                            <input type="hidden" id="req_type"" name="req_type" ..
Instead of all elements cramped to each other.

I tried using the new line in my echos but that didn't work. Maybe I am using it wrong. I also found sth like END ECHO >>.

Thanks
Raz

Avatar of MaartenHensen
MaartenHensen
Flag of Belgium image

use \n for a newline and \t for a tab in your strings...
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial