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 9119499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:24:35+00:00 2026-06-17T05:24:35+00:00

I am doing a simple query to retrieve car manufacturers from my db: $result

  • 0

I am doing a simple query to retrieve car manufacturers from my db:

$result = mysql_query("SELECT DISTINCT model_make_display_name FROM car_query_models_full ORDER By model_make_display_name ASC") or die(mysql_error());

while ($row = mysql_fetch_array($result)) {
echo "<p>".$row['model_make_display_name']."</p>\n";
}  

The data is appearing as normal in HTML view, however when I view source some of the results are appearing like so:

<p>Ariel
</p>
<p>Armstrong </p>
<p>Ascari
</p>
<p>Aston Mart</p>
<p>Audi
</p>
<p>Austin
</p>
<p>Austin Hea</p>
<p>Autobianch</p>
<p>Auverland
</p>
<p>Avanti
</p>
<p>Beijing
</p>
<p>Bentley
</p>

Notice some of the names are adding a break after the text forcing the closing p tag to go onto next line, what could be causing this?

Cheers

  • 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-06-17T05:24:36+00:00Added an answer on June 17, 2026 at 5:24 am

    Have you checked for newline characters on the ends of those manufacturers? Try

    echo "<p>".trim($row['model_make_display_name'])."</p>\n";
    

    to see if they’re present. If so, simply cleanse the database (on entry or one-time) and you’ll be good to go.

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

Sidebar

Related Questions

I'm doing a simple Linq query on an XML file IEnumerable<string> value = from
I have a simple query like: select count(*) from table Can I speed up
I am doing a really simple query in ASP.NET, but after I inserted the
I'm doing a simple query on the database, a search on two columns. I
I'm doing a simple ajax query which retrieves a variable-length list of values as
I've written some simple php code designed to retrieve data from a database based
i'm doing a simple query here and it returns that column 'Mary' does not
I have this simple T-SQL query, it emits a bunch of columns from a
I'm using Grails 1.3.7 and MSSQL Server 2008. Doing simple query through both dynamic
I was doing a simple query using explain to know precisely the execution time.

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.