Jump to content


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


Limiting max characters

Recommended Posts

I am currently trying to find a way to limit the max characters shown not the max characters entered.

Hello my name is lice, I am trying to write a script for my website that will allow me to set the max characters shown on the main page with a link to the full article.

This would be shown on a main page
Hello my name is lice... more <Link

Can you please push me in the right direction to where I could find something that will show me how todo this.


Share this post

Link to post
Share on other sites
Try this:

print substr($thestring, 0, $numchars) . "..."

Where numchars is the number of characters you want to limit the string to.

Share this post

Link to post
Share on other sites


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.