String functionality and manipulation methods are an enormous part of the PHP language and should be studied heavily. The following functions are by no means an exhaustive list of what can be done with strings and the resources on the php site should be read over.
When comparing strings, it’s best to use strcmp() and strcasecmp() which is a case insensitive version of the former. Both of these functions will return a zero value to indicate that the strings are equal, less than zero if the first string is less than the second, and greater than zero if the first string is greater.
Also worth noting is the strncmp() function that works similar with one difference. It will only do a comparison on the first n characters.
The strtr() function is used to translate characters or replace substrings. I can be given either two or three parameters, depending if you want to replace one or more values.