Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > PHP Forum

PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-12-2006, 05:06 PM
dirkfirst dirkfirst is offline
Programming Professional
 
Join Date: May 2006
Posts: 338
Rep Power: 11
dirkfirst is on a distinguished road
Default Line breaks not working

I'm displaying HTML and linebreaks are not working using "\r\n" or just one of the other.

<HTML><BODY>
text here
<?php print "\r\n"; ?>
more text


There is no line break in the above example.......
__________________
DirkFirst
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 06-12-2006, 06:07 PM
WebScott WebScott is offline
Newbie
 
Join Date: Jun 2006
Posts: 7
Rep Power: 0
WebScott is on a distinguished road
Default Need to use <br> in HTML

HTML ignores whitespace. You need to use a <BR> tag in your output.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-12-2006, 06:08 PM
Crane's Avatar   
Crane Crane is offline
Programming Expert
 
Join Date: Nov 2005
Posts: 399
Rep Power: 13
Crane is on a distinguished road
Default

Line breaks will not work between HTML statements.
You can use the <PRE> function to enable this

<HTML><BODY>
text here
<pre>
<?php print "\r\n"; ?>
</pre>
more text

using just \r\n will result in a linebreak but not a <BR>. your browser will register this as whitespace and remove it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-12-2006, 06:09 PM
Crane's Avatar   
Crane Crane is offline
Programming Expert
 
Join Date: Nov 2005
Posts: 399
Rep Power: 13
Crane is on a distinguished road
Default

Quote:
Originally Posted by WebScott
HTML ignores whitespace. You need to use a <BR> tag in your output.
Beat me to the punch line!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-16-2006, 05:20 PM
dirkfirst dirkfirst is offline
Programming Professional
 
Join Date: May 2006
Posts: 338
Rep Power: 11
dirkfirst is on a distinguished road
Default

Oh, stupid me. I wasn't even thinking about that. I haven't even messed with the code since I posted this. I'm going to fix that now.

Thank you for your help all!
__________________
DirkFirst
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
VB6.0:Tutorial, Command Line TcM VB Tutorials 9 08-25-2008 12:19 PM
Import SQL file command line Ronin Database & Database Programming 14 01-25-2008 02:56 PM
HTML Basic Formatting clookid Tutorials 14 03-06-2007 03:10 PM
Next Line and line lengths zee Java Help 3 02-25-2007 01:31 AM
PHP command Line dirkfirst PHP Forum 1 10-26-2006 10:31 AM


All times are GMT -5. The time now is 08:39 AM.

Contest Stats

John ........ 223.00000
dargueta ........ 168.00000
Xav ........ 164.00000
gaylo565 ........ 18.00000
WingedPanther ........ 15.00000
|pH| ........ 15.00000
Johnnyboy ........ 3.00000
navghost ........ 1.00000

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 66%

Ads