close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Text loosing layout

Thread began 5/14/2015 5:11 am by john70964 | Last modified 5/18/2015 2:15 pm by Ray Borduin | 573 views | 8 replies |

john70964

Text loosing layout

On page http://boatsforsalenow.com/BoatResultsDetail.php?RecNo=11422 there is a large amount of text.

When entered it is formatted correctly with returns etc but as you can see on the display page all the formatting is missing.

Can you please say what may be going wrong?

Many thanks

John

Sign in to reply to this post

Ray BorduinWebAssist

Line breaks are ignored in HTML... the solution is to replace the line breaks with "<br>" tags when writing it to the page.

Something like this should work:

<?php echo(str_replace("\n","<br>",$row_Recordset['Description'])); ?>

Sign in to reply to this post

john70964

Thanks Ray
Should that code go to the top of the page?

Sign in to reply to this post

Ray BorduinWebAssist

No that is in place of the code that is currently displaying the text in that area of the page. If you send me a copy of the page I can be more specific.

Sign in to reply to this post

john70964

Thanks Ray
Code is attached

Regards
John

Sign in to reply to this post

Ray BorduinWebAssist

The update would be made on the displaying page: BoatResultsDetail.php

That is the page that I would need to reference for implementing the code I suggested.

Sign in to reply to this post

john70964

Thanks Ray
I am attaching that file

Sign in to reply to this post

Ray BorduinWebAssist

On line 262 replace this:

php:
<?php echo $row_DetailRS1['Description1']; ?>



with this:

php:
<?php echo(str_replace("\n","<br>",$row_DetailRS1['Description1'])); ?>
Sign in to reply to this post

john70964

Very many thanks for your help Ray.

The text is now displaying correctly.

Regards

John

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...