I have some variable like this;

```
<?php the_field('reviews'); ?>

```

This variable prints;

```
Some text 1
Some text 2
Some text 3
Some text 4

```

source code is here:

[![](https://i.stack.imgur.com/9vm5Q.jpg)](https://i.stack.imgur.com/9vm5Q.jpg)

and look like this

[![](https://i.stack.imgur.com/vj98f.jpg)](https://i.stack.imgur.com/vj98f.jpg)

Now, i want to convert **br** tag to **hr** like this

[![enter image description here](https://i.stack.imgur.com/OLgCz.jpg)](https://i.stack.imgur.com/OLgCz.jpg)

I tried the following ***[nospor](https://stackoverflow.com/users/6356056/nospor)***'s codes but not worked.

```
$change = the_field('reviews');
$change = str_replace(array('<br>', '</br>'), array('', '<hr>'), $change);
echo $change;

```

How can i change that **br** tags to **hr** tag with PHP?
['https://Stackoverflow.com/questions/37563013', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2745938/']
`<br>Some text 1</br>` - wow.... who wrote that?

Anyway... do it as simple as possible ;)

```
$change = the_field('reviews');
$change = str_replace(array('<br>', '</br>'), array('', '<hr>'), $change);
echo $change;

```

edit:

Probably instead of `the_field` you should use `get_field` because first one displays it and second returns.
```
$string= the_field('reviews');
$change = str_replace(
  array('<br>', '</br>'), 
  array('<hr>', ''), 
  $string
);
echo $change;

```

Use simple php str\_replace function