Skip to content

Tag Archives: PHP-string

The quotemeta() function is an inbuilt function in PHP which accepts a string as an argument and returns a string which has backslashes added in… Read More
The strrchr() function is a built-in function in PHP. This function takes two arguments a string and a character. This function searches the given character… Read More
The strstr() function is a built-in function in PHP. It searches for the first occurrence of a string inside another string and displays the portion… Read More
The function str_rot13() is a built-in function in php. This function accepts a string and shifts every alphabet present in the string by 13 places… Read More
The ltrim() function is a built-in function in PHP which removes whitespaces or other characters (if specified) from the left side of a string. Syntax:… Read More
The strcoll() is an inbuilt function in PHP and is used to compare two strings. This function is case-sensitive which points that capital and small… Read More
The rtrim() function is a built-in function in PHP which removes whitespaces or other characters (if specified) from the right side of a string. Syntax:… Read More
The strcspn() function is an in-built function in PHP which returns the number of characters present in a string before any part of the specified… Read More
The strnatcasecmp() function is a built-in function in PHP which compares this string using “natural order” algorithm. This function accepts two strings as parameter and… Read More
The strnatcmp() is a built-in function on PHP. This function compares two strings using a “natural order” algorithm and return a positive integer, negative or… Read More
The strspn() function is an in-built function in PHP which finds the length of the initial segment of a string consisting entirely of characters contained… Read More
The addslashes() function is an inbuilt function in PHP and it returns a string with backslashes in front of predefined characters. It does not take… Read More
str_pad: Pad a string to a certain length with another string. Syntax:- str_pad (input, pad_length, pad_string_value, pad_type) It returns the padded string. Parameters Description input:-The… Read More
Given the two strings we have to check if one string is a rotation of another string. Examples: Input : $string1 = "WayToCrack", $string2 =… Read More
You are given an array of strings. You have to sort the given array in standard way (case of alphabets matters) as well as natural… Read More