Jump to content

Restricting Number of characters displayed


cdoggg94

Recommended Posts

I have been googling, and can't really find what I want.

 

Basically I want to know if there is a way to restrict the number of characters I display at any time

 

eg:

 

If I have this in a database:

 

"Lorem ipsum dolor sit amet, magna ac pellentesque tellus in, aliquam amet sapien, vitae nec purus pellentesque ligula sit orci. Praesent netus pellentesque nulla. Donec nec urna in, vel molestie. Sed mus eu ultricies sed, eleifend placerat suspendisse id, cras vivamus quam, velit ac suspendisse nonummy porttitor urna, volutpat dignissim quis. Sed varius nam orci ultrices."

 

I and i only want to display this (just a preview of the full story):

 

"Lorem ipsum dolor sit amet, magna ac pellentesque tellus in, aliquam amet sapien, vitae nec purus pellentesque ligula sit orci."

 

The way I display it on a page would be something like this:

 

 

<?php echo $row_Display['some_text'] ;?>

 

is there anything I can do for this?

 

In the past when I wanted to do this, I just inserted the text block into two different columns in the db and restricted the char count there.

Edited by cdoggg94
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.