Text Formatting
Trim leading and trailing whitespace
$MyString = trim($MyString);
Capitalise 1st letter of first word
$MyString = strtolower($MyString);
$MyString = ucfirst($MyString);
Capitalise 1st letter of every word (but leave capitalised words like “ABC” as they are)
$MyString = ucwords($MyString);
String to lowercase
$MyString = strtolower($MyString);
String to uppercase
$MyString = strtoupper($MyString);
Convert \n character to <br> when displaying as normal php text
$MyString = nl2br($MyString);
