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!
It's one way. You could also use trim() if you know the whitespace is at the beginning or end. Regular expressions might be a second option. preg_replace(). I'd use str_replace() before preg_replace().