View Single Post
Old 03-13-2005, 11:39 AM  
Smut
Confirmed User
 
Join Date: Sep 2002
Posts: 654
PHP function to truncate a string...

Can someone please let me know which function I should be looking for to truncate a variable string to a set number of characters?

Ex. $string="ABCDEFGHIJKLMNOPQRSTUVWXYZ";

function to truncate("$string", 5);
echo function to truncate(); //Would output "ABCDE"

Any assistance is appreciated.

Thanks
Smut is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote