<?php//break long word.function line_wrap($str, $max = 50) { $str = preg_replace('/(\S{' . $max . ',})/e', 'wordwrap(\'$1\', ' . $max . ', "\n", true)', $str);//return stringreturn $str;}//usageecho line_wrap('Thisisanexampleofalinethatexceedsthelimitofallowedcharacters.', 30);?>