Strpos returns the position of the first occurrence of string A in string B (returns the result as a number)
The inverse of the PHP string function is Strrpos returns the last occurrence of string A in string B (returns the result as a number)
Addcslashes to the specified character preceded by a backslash "" such as Echo addcslashes ($string, "y,o"); Adds a backslash "" before the specified character "Y,o"
Addslashes "" Special character refers to single quotation marks, double quotation marks, null and backslash "" in front of a specific character in a string
Strstr gets the substring at the end of string B that specifies the position of the first occurrence of string A in string b
STRRCHR Gets the substring that specifies the last occurrence of string A in string B to the end of string b
The Array_push function is used to increase the specified value to the end of the array $array =array ("0" = "Ming", "1" and "Day"); Array_push ($array, "technology");
Print_r ($array); Operation result is Array ([0]=> Ming [1]=> Day [2]=> technology);
The inverse of the PHP string function is array_unshift used to increment the specified value to the beginning of the array
The Array_pop function returns the last element of an array, and the opposite function is the Array_shift function, which returns the first element of an array
The Array_unique function removes duplicate values from the specified array and returns a new array
The Array_merge function is used to combine multiple numbers together and return a new array
The Array_slice function is used to extract an array element of the specified length from the specified position of the array, and to save the extracted elements to a new array, such as $array=array ("I", "yes", "Hu", "Rain", "Xuan");
$array 1=array_slice ($array, 2, 3);
The value of $array 1 is "Hu Yuxuan"
The inverse of the PHP string function is the Array_splice function that deletes the specified number of array elements from the specified position in the array and saves the deleted element to the new array
http://www.bkjia.com/PHPjc/446233.html www.bkjia.com true http://www.bkjia.com/PHPjc/446233.html techarticle Strpos Returns the position of the first occurrence of string A in string B (The return result is a number), and the inverse of the PHP string function is Strrpos returns the position of the last occurrence of string A in string B ...