I have a PHP loop that adds data into a table cell. However, I want to apply a static size to the table cell, so if more data is returned than can fit inside the cell I want th
You can use mb_strimwidth
printf('%s ', mb_strimwidth($cellContent, 0, 100, '…'));
If you want to truncate with respect to word boundaries, see
You can also control content display with the CSS property text-overflow: ellipsis
Unfortunately, browser support varies.