Jump to content

[SOLVED] Output on wrong line


The Little Guy

Recommended Posts

$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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.