12-10-2010, 12:02 PM
|
|
Confirmed User
Join Date: Mar 2009
Posts: 1,200
|
Quote:
Originally Posted by Kiopa_Matt
Code:
$lines = explode("\n", $contents);
$new_content = implode("\n", array_map('format_line', $lines));
function format_line($line) {
$line = '+' . preg_replace("/\s/", "\s+", $line);
return $line;
}
Or something like that at least should work.
|
 
|
|
|