what do the "\n"s mean? in this code? (book doesn'

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
phexus
Forum Newbie
Posts: 2
Joined: Fri Jun 15, 2007 2:33 pm

what do the "\n"s mean? in this code? (book doesn'

Post by phexus »

The code works fine If I take them out completely, so I'm wondering what they are for..
.

echo "<tr>\n <td align='right'>$distance</td>\n";
echo " <td align = 'right'>". $distance / 10 ."</td>\n</tr>\n";
$distance += 50;

Thanks. :wink:
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

they

are

newline

characters

similar

to

those

that

you

see

here
phexus
Forum Newbie
Posts: 2
Joined: Fri Jun 15, 2007 2:33 pm

Post by phexus »

great thanks :wink:
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

There's alot more informations and additional escape characters listed on php.net, incase you're interested:
http://php.net/manual/en/language.types ... tax.double
Post Reply