Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6542907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:16:58+00:00 2026-05-25T11:16:58+00:00

I have what is a simple problem that hopefully has a simple solution: I

  • 0

I have what is a simple problem that hopefully has a simple solution:
I have a site written in PHP and HTML, using a Linux server with MySQL.
It has a form where users fill in some personal info, including a textarea in which
they are meant to copy and paste a test CV.

I have also set up a back end for my client where she can query the database to see who
registered and retrieve their info.

My problem is that when I query and echo the content of the table row that contains the
CV (alot of text), the line breaks are all gone – everything is printed in one line.

Does someone know if I can solve this by using the right kind of collation/character encoding
for that specific row that contains the users’s cvs? I am hoping that such collation exists that saves and maintains line breaks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:16:59+00:00Added an answer on May 25, 2026 at 11:16 am

    Collation has nothing to do with it – collations and charsets won’t touch your newlines at all. If you want to see it, look at the page source of the echo’d text.

    HTML, however, treats line breaks like all other whitespace under normal circumstances, so they won’t be visible when you echo them to a browser. You shouldn’t be outputting plain text as HTML anyway, because they’re not the same. You must convert the plain text to HTML first; a simple method is to call htmlspecialchars() and nl2br() on the text (in that order, otherwise htmlspecialchars will eat your newly-created br tags and turn them into <br/>. Failing to do so will not only create undesired output, it can also be a major security risk (XSS).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a terrible problem that hopefully has a very simple answer. I am
I have a very simple problem and a solution that will work, but I'm
I have a (hopefully quite simple) Javascript problem. I've search but found nothing that
I have a simple problem that i cannot solve. I have a dictionary: aa
i have very simple problem. I need to create model, that represent element of
I have simple WinForms application where modifying Windows Registry. The problem is that in
I have a pretty simple problem. Basically I have an array called $list that
This seems like a simple problem: I have a WF4 activity that guides the
My problem is simple: I have a long list of elements that I want
I have a simple problem when querying the SQL Server 2005 database. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.