This is something to do with the ckeditor, it keeps adding a <br /> at the end and, for any reason, I cannot get rid of it consistently.
Sometimes I get a < at the end of my string;
Sometimes I get all well cleared.
I’m using this at the moment, but perhaps the lack of consistency could have something to do with the white spaces that could have been added or somethinhg?
Anyway, here’s the thing:
substr_replace($noticia->primeiro_paragrafo_noticia ,"",-7);
Is there a way do this on a way that we can garantee that there are no whitespaces involved? Could we trim, and then do this substr_replace and then “un trim” or something?
I have tried like so as well, but here I cannot get any removal at all:
rtrim($noticia->primeiro_paragrafo_noticia, '<br />');
Thanks a lot,
Marcio