I am looking for a custom function which adds a <br> multiple times after a dot and a space occurs.
Example:
Web 2.0 Business Development | Simple Star, [login to view URL] you ready to jump into something new &exciting? Simple Star, Inc., the creators of PhotoShow, is looking for a seriously driven Web 2.0 Business Development executive to join the team. The ideal candidate will combine their excitement for all that Web 2.0 has to offer with exceptional business acumen to create great opportunities for the PhotoShow platform. This is an example to demonstrate everything.
Your function would be called like:
splittext($text,1);
The first <br> qould be added after the dot below because it's the first time there is a dot and a space within the string.
"team. The"
The second <br> would be added after the dot below because it's the next time the dot and space shows up.
"platform. This"
This process would be repeated for the whole string. As you can see above, we had the function set to
splittext($text,1);
Now if we would have set it to
splittext($text,2);
then the first <br> would have been added after
"platform. This"
because it is the second time that we found a dot and a space. Remember that we would also add the <br> to the rest of the string each time we found the dot and the space twice (if set to 2).
What I basically try to do is to add spacing between a very long string so I'm open for suggestions. I would be also happy with a more simple function which adds for example a <br> after every 100 words if there is a dot - space meaning it's not a must that the function works as described above.
Please do not bid if you are not willing to provide a demo as I have started to only pick programmers who provide a working demo for small jobs like this as I simply wasted too much money on "promises".
Your demo can be a simple textarea where I can paste some string to see if your script does the job well.
Thanks