August 6th, 2000, 07:12 PM
Is there a way for me to cut off part of a string (in a variable) after a number of characters, then add on to the string "..."?
August 6th, 2000, 07:29 PM
You can cut your part of a string using the substr function then you can concactenate something to the end.
$string1 = "This is a very big house";
$string2 = "small house";
$string1 = substr($string1, 0, 15);
//Now string1 looks like "This is a very "
$string1 = $string1 . $string2;
// Now $string1 reads "This is a very small house"