On my site, I am adding hunger so you that your "character" has to eat or else the posts on my forum that I made will show up with a '...' after each word. I am currently going:
$message = $post_from_database;
$message = str_replace(" ", " ...", $message);
Now this works fine. However if the user adds a bunch of extra spaces with no words on them, posts will have random '...' in many places. How can I get this to work so that it only adds '...'
after all the words.