PHP: How can I replace HTML-tags replaced with " "?

With the following code:

```
$str = 'line1<div>line2</div>line3';
echo strip_tags($str);

```

I get 

```
line1line2line3

```

But expected result is

```
line1 line2 line3

```

Thanks