# Spliting string in PHP

**URL:** <https://forum.kirupa.com/t/spliting-string-in-php/72826>\
**Category:** programming\
**Created:** [December 9, 2004, 5:09pm UTC](https://forum.kirupa.com/t/spliting-string-in-php/72826 "2004-12-09T17:09:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgallen](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mgallen/32/616_2.png) [@mgallen](https://forum.kirupa.com/u/mgallen)\
**Post date:** [December 9, 2004, 5:09pm UTC](https://forum.kirupa.com/t/spliting-string-in-php/72826/1 "2004-12-09T17:09:34Z")

</div>

Hello everyone, I was wondering how could I split a string in PHP and ad a “\<br\>” at the end of each line. For example mi string is:

1.Something 2.Something else 3.Something else.

I want the string to look like this:  
1.Something\<br\>  
2.Something else \<br\>  
3.Something else.  
I’f anyone please could help me… I’ve tried everithing, from strtoken to substr, and I can’t get it right.

Thanks
