# str\_replace - should be easy!

**URL:** <https://forum.kirupa.com/t/str-replace-should-be-easy/270678>\
**Category:** programming\
**Created:** [September 12, 2008, 8:30am UTC](https://forum.kirupa.com/t/str-replace-should-be-easy/270678 "2008-09-12T08:30:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thedaveyb](https://avatars.discourse-cdn.com/v4/letter/t/4af34b/32.png) [@thedaveyb](https://forum.kirupa.com/u/thedaveyb)\
**Post date:** [September 12, 2008, 8:30am UTC](https://forum.kirupa.com/t/str-replace-should-be-easy/270678/1 "2008-09-12T08:30:56Z")

</div>

Yo Kirupians,

I am try to split a string that comes from the database - its currently a comma i wish to replace with a break -

(‘Northwich, Cheshire’ becomes ‘Northwich\<br\>Cheshire’)

```php
 
 $row['Address']= str_replace(", ","<br>", $row['Address']);

```

then this is to be used below when an email is sent…

```php

$body .= $row['Address'].",<br>
";

```

However it is just coming up as blank in the email! Any ideas on where I am going wrong!?
