php - str_ireplace is adding a <br> on webserver (localhost is working)

one text

I want to colorize the keywords of my Text-Output. I am pulling the keywords out of the DB. Running a loop and using this function to change the code:

str_ireplace($row['keyword'], "<span class=\"".$row['mycolor']."\">".$row['keyword']."</span>", $_POST['mytext'])

My localhost is working fine. The result is for example this:

more text... <span class="red">my keyword</span> more text...

The exact same file with the exact same "keyword"-DB is producing this in the www:

more text... <span class="red<br ></span>">my keyword</span> more text...

I dont understand why the webserver is adding the <br ></span> on the wrong position.

Do you have any clues?

I updated the keywords-CSV file (utf-8) before and uploaded it to the DB. I am doin gthis the last two years. But now there is the strange <br >.

Source