There is a function to handle this: wordwrap()
Usage: string wordwrap ( string str [, int width [, string break [, int cut]]] )
Purpose: Wraps a string to a given number of characters using a string break character.
Here is an example how I would do it...
$limit = 10;
$name = 'heyeveryonemynameistommysox';
echo wordwrap( $name, $limit );