How to replace the . and space with <br> tag in php

Hello I want to replace . which is coming with space like

$data = ‘Hello xzx. Thank manresa.org’;

I am using like

str_replace(". ","<br><br>",$data);

But it is not working for me.

when I replace only . which is not with space

$data = ‘Hello **xzx.**Thank manresa.org’;

 str_replace(".","<br><br>",$data);

result is:->

Hello xzx

Thank manresa

org

so I want to break string which has dot . with space.how can I do it.

Read more here: How to replace the . and space with <br> tag in php

Leave a Reply

Your email address will not be published. Required fields are marked *