PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
The result is way too long (like 5,000 characters of text). I want to shorten it so that it only shows like 300 characters and follows them with a '...' to let the view know that there is more. I believe this is called truncating, but I cannot figure out how to do it.
The truncating happens in "substr($variable, 0, 1000)". The first number is for the beginning of the line. The second is the cut off the end of the line. So it is removing -1 and back (which is nothing) and 1001 and forward. Basically cutting the ends off the result. I added the "..." just to let the user know that there was more.