Forum Moderators: coopster

Message Too Old, No Replies

Create new line in PHP output

         

calientez1

7:52 pm on Apr 17, 2004 (gmt 0)



I'm trying to create a new line in the output of the form I'm using with PHP. Currently the results print out like this:

FirstNameLastNameAddressCityStateZip

I would like it to appear like this

FirstName
LastName
Address
City
State
Zip

Here's part of my script:

$First_Name = $_POST['First_Name'];
$Last_Name = $_POST['Last_Name'] ;
$Address = $_POST['Address'] ;
$City = $_POST['City'] ;
$State_or_Province = $_POST['State_or_Province'] ;
$Postal_Code = $_POST['Postal_Code'] ;

I've heard you can use a /n at the end of the line, but every time I do it I get a parse error. Where exactly in each line should I put the /n, or is there anything else I can use? Please help! Thx.

DanA

8:07 pm on Apr 17, 2004 (gmt 0)

10+ Year Member



if you want to display :
echo "$First_name<br />$Last_name<br />";
If you want to have newlines in the html code then
\n is what you need.