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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.