Are there any PHP functions or methods that can automatically insert line breaks in long words to prevent them from exceeding the table cell size?

When displaying long words in a table cell, they can exceed the cell size and break the layout. To prevent this, you can use the PHP `wordwrap()` function to automatically insert line breaks in long words. This function breaks a string into lines with a specified line length.

<?php
$longWord = "supercalifragilisticexpialidocious";
$wrappedWord = wordwrap($longWord, 10, "<br>", true);
echo $wrappedWord;
?>