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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:14:52+00:00 2026-05-26T20:14:52+00:00

I have a long description field in a products table with a data type:

  • 0

I have a long description field in a products table with a data type: text. The collation is latin1_swedish_ci for reference.

For products in my database I need a superscript 2, bullet points for a list and line breaks. For example when the bullet points output on the page they output as:

•

Is there any way round this so i can display my long description correctly with line breaks too?

$product = $this->MProducts->getProduct($id);
$data['product'] = $product;

<?php echo "<p style='clear:both; padding-top:10px;'>".$product['longdesc']."</p>";?>

Regards,

  • 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-26T20:14:53+00:00Added an answer on May 26, 2026 at 8:14 pm

    You have to ensure that you’re retrieving the right character set from MySQL.

    SET NAMES 'charset_name' COLLATE 'collation_name'
    

    http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html

    And you have to ensure that the string is unicode after you receive it.
    http://php.net/manual/en/function.utf8-encode.php

    And you have to encode html entities if you’re outputting to a browser. Specifying a charset here is important too.
    http://php.net/manual/en/function.htmlentities.php

    Hope that helps…

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

Sidebar

Related Questions

I have orders details as serialized in the TEXT Type of mysql field. Recently
I need to have a long descriptive dialog in part of my program and
I have a mysql table that includes the fields: Name - Year - Description
I have tried and tried and tried now. I have a mysql field (TEXT)
I need to query a table in an SQLite database to return all the
In my application I have a model, with a :string field containing a description.
I need help in parsing a very long text file which looks like: NAME
I have a model that has multiple text properties - title, short and long
I have a field in a table that I want to store a potentially
I have long since forgotten the password for the root user on one of

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.