chop() - string function

Sep 06, 2010 Author: SEO
The chop() function will remove a white space or other predefined character from the right end of a string.

addslashes() String Function

Sep 02, 2010 Author: City Hall
addslashes() is usually used to prepare a string for storage in a database or some kind of delimited format such as comma-separated values (CSV). The function places a single backslash in front of any…

Making a String Uppercase, Lowercase, or Capitalized

Aug 28, 2010 Author: Developer
One occasional problem with PHP is that MySQL supports case-insensitive character fields, but strings in PHP are case sensitive. In a query, MySQL makes no distinction between the words Ferrett, FERRETT,…

Generating Random Passwords

Aug 28, 2010 Author: Developer
Random (but difficult-to-guess) strings are important in user security. For example, if someone loses a password and you're using MD5 hashes, you won't be able to, nor should you want to, look it up.…

Extracting a Substring Using substr

Nov 29, 2009 Author: makedon
The substr() function returns a part of a string. You provide a string and the position of the first character to be extracted (keep in mind that the first character has the index 0). From this character…