# \[PHP\] Wordrap - just long words

**URL:** <https://forum.kirupa.com/t/php-wordrap-just-long-words/142832>\
**Category:** Uncategorized\
**Created:** [March 31, 2005, 11:44pm UTC](https://forum.kirupa.com/t/php-wordrap-just-long-words/142832 "2005-03-31T23:44:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaveMania](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@DaveMania](https://forum.kirupa.com/u/DaveMania)\
**Post date:** [March 31, 2005, 11:44pm UTC](https://forum.kirupa.com/t/php-wordrap-just-long-words/142832/1 "2005-03-31T23:44:46Z")

</div>

Is there a way of getting the wordwrap() function to just wrap the idividual words (un separated by spaces) and not sentences that have spaces in them.

I.E.

Turning  
‘This is a very long woooooooooooooooooooooord’

Into  
‘This is a very long  
woooooooooooooo  
oooooooord’

Not  
‘This is a very  
long wooooooooo  
ooooooooooooord’

(the examples split every 15 chars)

Any help would be appreciated  
Thanks
