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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:47:35+00:00 2026-06-07T07:47:35+00:00

i have a mysql database and a table full of information, specifically a column

  • 0

i have a mysql database and a table full of information, specifically a column of product descriptions. This column is used in my scripts twice. Its max length is 1000 characters.

One of the uses for this information is a brief description of any given product. I would like to display a shortened version of the description that I have just mentioned, so it will be say for instance 200 characters long.

Now, using PHP I would like to append the string with “…” (3 dots) at the point where it reaches 200 characters. So basically only the first 200 characters are displayed.

How would I go about something like this? I am sure it will be a fairly simple task but the internet is a big place to look for something you don’t know the name of 🙂

If anyone could help in this regard, with an example or some links relating to the relevant functions that would be great. Thanks a lot!

  • 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-07T07:47:37+00:00Added an answer on June 7, 2026 at 7:47 am

    Only collect 200 characters from your database in the first place.

    $sql = "SELECT LEFT(article, 200) as article WHERE ETC ETC "
    

    Then apply something like this, but essentially you need to go back to the previous word end chop off the rest and apend an elipsis.

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

Sidebar

Related Questions

I have a MySQL database table called Participant that looks something like this: (idParticipant)
i have a large mysql database table in which one column contains values ranging
I have a MySQL database includes a table named 'Task'. and I used Hibernate
I have a MySQL database full of user information, like their username, password, email,
I have a legacy mysql database and there's this table which has a few
I have mysql database structure like below: CREATE TABLE test ( id int(11) NOT
I have a MySQL database where the table was set up to store the
I have a mysql database with a table structure like below : Table Name
I have a MySQL database with a fairly large table where the products are.
I have a MySQL database and with a php function i made a table

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.