When i enter a value like rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr in a textarea on my form,upon echoing it, it displays as a single line someone help sort this cozy it's deforming my table. Your help is so much welcome
Use the word-break: break-all
css property value on the large table cell.
I don't think there's anything you can do about that, other than to truncate the characters or break it apart after X number of characters. Id' truncate...
function truncate_chars($string, $limit, $break=' ', $pad='...') {
// return with no change if string is shorter than $limit
if(strlen($string) <= $limit) return $string;
$string = substr($string, 0, $limit);
if(false !== ($breakpoint = strrpos($string, $break))) {
$string = substr($string, 0, $breakpoint);
}
return $string . $pad;
}
echo truncate_chars($string);