I’ve a php question.
I’ve a php code, it prints some long texts.
I want replace “n” character in output text with “N”. I can create a function. but I can’t (and don’t like!) put my text to a function (because I have many texts!).
Is there any way to replace “n” with “N” without any function???
Thanks ..
No need to create a function, just use
str_replace, the built in function for this purpose like this:[EDIT] If you don’t want to put your text in a function, because there is lots of text (as you say), do it like this:
This effectively buffers (catches and stores) all your output and at the end get’s it and replaces the ‘n’ to ‘N’ and echoes it.