<?php // could be done in one line $str = "a\r\nstring\n"; $str = str_replace(["\r\n", "\n"], "[test]", $str); // PHP_EOL /// "\n" echo $str; ?>
You have javascript disabled. You will not be able to edit any code.