Operations on Strings PHP contains many functions for handling strings. Your best point of reference to find and learn these functions is the String Section of the manual . Below are few common problems and possible solutions for string handling. A PHP string is a zero indexed array of characters. This means that the first letter of a string is at position zero in the array.
All string functions use zero as the index of the first character.
This function is available in PHP, but simple strings can be compared directly also . It is used by supplying the position of the substring you wish to get from the bigger string. Sometimes you do not know the exact position of the substring. It takes a format string and a series of arguments. The format string outlines exactly how the contents of the variables are to be displayed, including the precision of numbers.