Re: cut off a string?
- From: <dev>
- Date: Thu, 30 Jun 2005 09:57:44 +0200
<dev> wrote in message
news:42c3a3ae$0$2967$e4fe514c@xxxxxxxxxxxxxxxxxxxxxxxxxxx
> 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
.
- References:
- cut off a string?
- From: dev
- cut off a string?
- Prev by Date: Re: Using the value of a variable as a variable name
- Next by Date: Re: PHP and/or Javascript
- Previous by thread: cut off a string?
- Next by thread: Re: cut off a string?
- Index(es):
Relevant Pages
|