function dowordwrap($text) { global $wordwrap; if ($wordwrap!=0 and $text!="") { return preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$wordwrap."})/i"," \\1\n",$text); } }