|
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
|