The Little Guy Posted March 8, 2009 Share Posted March 8, 2009 $code = highlight_string($line,TRUE); $find = array('<code>','</code>',' ', '<br />'); $replace = array('','',"\t",''); $opt = str_replace($find,$replace,$code); $opt = preg_replace("~\n~",'',$opt,2); echo '<pre>'.$opt.'<pre>'; Why does the above code make the code output on line 2 and not on line one? See here: http://beta.phpsnips.com/snippet.php?id=70 Link to comment https://forums.phpfreaks.com/topic/148435-solved-output-on-wrong-line/ Share on other sites More sharing options...
The Little Guy Posted March 8, 2009 Author Share Posted March 8, 2009 haha, Got it it was a CSS thing, sorry everyone Link to comment https://forums.phpfreaks.com/topic/148435-solved-output-on-wrong-line/#findComment-779285 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.