Hi,
to make my layout of some text better,i have to split a textstring into 2 even parts.
I've seenon php.net inthe function list,but cant find annything interesting about it.
So i know how to get the count of the words inthe string,buthow to splt the string in a total words/2.
Can anybody help me?
Thanxin advance.
split text string in 2 even parts
Moderator: General Moderators
- potato
- Forum Contributor
- Posts: 192
- Joined: Tue Mar 16, 2004 8:30 am
- Location: my lovely trailer, next to the big tree
The wordwrap functionis not good for this, i think.
You can split a string oncharacters, but not on words.
What i need is something where you split a text into 2 parts, so i need to display the second part also.
Something like this as output:
You can split a string oncharacters, but not on words.
What i need is something where you split a text into 2 parts, so i need to display the second part also.
Something like this as output:
Code: Select all
echo "<table><tr><td>". $part1."</td></tr>
<tr><td>".$part2."</td></tr></table>";