You are here: Re: cut off a string? « PHP Programming Language « IT news, forums, messages
Re: cut off a string?

Posted by <dev> on 06/30/05 10:57

<dev> wrote in message
news:42c3a3ae$0$2967$e4fe514c@dreader29.news.xs4all.nl...
> Hey all,
>
> I have a small CMS tool that users can leave a max 200 characters message.
>
> everthing is fine but IF someone does something like this:
>
> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
> 200 characters long
>
> my whole layout bearks appart even when i use style="width:300px" etc
>
> so is there a premade function in php that splits my words?
>
>
> Cheers,
>
> D
>

FOUND !! :))

$text=wordwrap($text, 50, "<br />\n",1);

notice the 1 at the end that is important so he looks now also in long words
without \s

D

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация