View Full Version : How can i limit a certain amount of characters in a string?
12-09-2003, 11:07 PM
like for example if they go over 300 characters then it only outputs the first three hundred. if anyone knows that would be great, lol ive tried so much, but unforutnatly i dont know the function.
$first_300 = substr($the_complete_string, 0, 300);
12-10-2003, 03:45 AM
thanx alot man youve been a great help! what im using it for is a new forum system and istea do of making the user go back and reedit their sig and stuff it eliminates the characters. lol you just saved me like 2 days of work, i would have never guessed it was substr. so once again thanx alot.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.