# Line break in php

**URL:** <https://forum.kirupa.com/t/line-break-in-php/232423>\
**Category:** Uncategorized\
**Created:** [July 13, 2007, 3:40pm UTC](https://forum.kirupa.com/t/line-break-in-php/232423 "2007-07-13T15:40:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wo1olf](https://avatars.discourse-cdn.com/v4/letter/w/278dde/32.png) [@wo1olf](https://forum.kirupa.com/u/wo1olf)\
**Post date:** [July 13, 2007, 3:40pm UTC](https://forum.kirupa.com/t/line-break-in-php/232423/1 "2007-07-13T15:40:03Z")

</div>

In a form where a user is given a textarea; how can i do in php to detect line breaks in his text, so i can replace them with the appropriate tags in html.  
i tried this but it doesn’t work

code:  
$texte = str\_replace(vbCrL&, '\< br\> ', $texte);  
echo $texte ;
