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:#f 3f3f3; " ><form method="post" action="./../processreques t.php"><in put 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:#f 3f3f3; " >
<form method="post" action="./../processreques t.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
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:#f
But I would like to get sth like:
<div class="usercontent" style="display:block;">
<div id="dcdiv" style="background-color:#f
<form method="post" action="./../processreques
<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
use \n for a newline and \t for a tab in your strings...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.