

Your particular goals and needs may vary. The majority, if not all, of the examples provided, are performed on a personal development/learning workstation-environment and should not be considered production quality or ready.

PHP TRIM AFTER HOW TO
Among those, he shares a love of tabletop RPG games, reading fantasy novels, and spending time with his wife and two daughters.ĭisclaimer: The examples presented in this post are hypothetical ideas of how to achieve similar types of results. Other favorite activities find him with his nose buried in a good book, article, or the Linux command line. Josh Otwell has a passion to study and grow as a SQL Developer and blogger.
PHP TRIM AFTER FREE
To receive email notifications (Never Spam) from this blog (“Digital Owl’s Prose”) for the latest blog posts as they are published, please subscribe (of your own volition) by clicking the ‘Click To Subscribe!’ button in the sidebar on the homepage! (Feel free at any time to review the Digital Owl’s Prose Privacy Policy Page for any questions you may have about: email updates, opt-in, opt-out, contact forms, etc…)īe sure and visit the “Best Of” page for a collection of my best blog posts. Since whitespace is difficult to see in browser output, I’ll use the strlen ( ) function and provide the length of an example string, that is prefixed with a single space character, before and after using trim ( ) on the string variable: If the optional 2nd parameter is not specified, trim ( ) removes these characters: Syntax: trim (string, charlist) Parameters: The function accepts one mandatory parameter and one optional parameter as shown in the above syntax and described below. Trim ( ) accepts 1 required parameter – the target string – and 1 optional parameter, the character(s) to remove. It’s a common practice to sanitize any user-input data from a web form, including the removal of any whitespace (blanks and spaces) from both the beginning and end of a string. Since coffee is my favorite drink, you can even buy me one if you would like!Ī space is a character and can be targeted with any of the 3 string functions I am covering in this post. If you enjoy the content written here, by all means, share this blog and your favorite post(s) with others who may benefit from or like it as well.
