if($vbulletin->GPC['wysiwyg']){ $newline = '<br>';}else{ $newline = "\n";}// Rest of your code here...