Trimming Blanks from a String – PHP
You want to remove whitespace from the beginning or end of a string. For example, you want to clean up user input before validating it.
Use ltrim( ) , rtrim( ), or trim( ). ltrim( ) removes whitespace from the beginning of a string, rtrim( ) from the end of a string, and trim( ) from both the beginning and end of a string:
Want to have your say? just login



Be first to show your opinion !!!