Split long text string in half without breaking a word
Moderator: General Moderators
Split long text string in half without breaking a word
Does anyone know how to split a long text string from say a forums program by a fraction i.e. half third etc. without breaking a word in half?
I can only think of [url=http://se.php.net/manual/en/function.wordwrap.php]wordwrap() but that is with simply using an existing function.
You can surely build something fun using str_pos() or similiar also.
You dont mention any reason for it, so it's hard to put it in perspective usage.
You can surely build something fun using str_pos() or similiar also.
You dont mention any reason for it, so it's hard to put it in perspective usage.