Im trying to limit a string to 10 characters, but i can't work out how to do it. Ive tried string pad but it can only be used to make the string bigger;
$shorten = "hihihihihihihihihihiihhihihihihihihih";
$shorten = str_pad ( $shorten, 10 );
echo $shorten
That just echos "hihihihihihihihihihiihhihihihihihihih". Is there any function to shrink a string?


Reply With Quote
I will +rep you when i get my other account back.
