So I have some strange issue with nl2br so I have the following code:
var infowindow = new google.maps.InfoWindow({
content: "<?= nl2br($store["Stores"]["address"]) ?>"
});
the output when viewing the browser source is as shown in this image:

As you can see the <br /> have been correctly introduced but for some reason the line still breaks which causes a javascript error.
The variables values is what has been posted from the text area input of the form
as you can see from the examples in the documentation, this seems to be intended behaviour. if you want to replace all newlines to get the string into one line, a simple regex should do it. this is how i would try (typed out of my head, this isn’t tested):