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 string is trimmed of surrounding whitespace. The ereg_ replaces multiple spaces with a single space. The preg_ replaces less-than and greater-than characters with underscores.
It's not very well written however. If anything, it should be using preg_ for both, but I'd only use regex for the spaces replacement. The latter is likely faster done with str_replace()