I'm trying to replace a regular expression with a line break. Right now I'm trying this which doesn't work:
$string = str_replace(';', '\n', $string);
I need to make sure that semi colons are exactly the same as '\n' line breaks, how can I get this done?
Use double quotes, otherwise \n
is not parsed. Documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With