Skip to content

Tag Archives: PHP-string

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
The stristr() 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 strpbrk() function is an in-built function in PHP which searches a string for any of the specified characters. This function returns the rest of… Read More
The strtr() is an inbuilt function in PHP which is used to replace a substring in a string to a given string of characters. It… Read More
The stripslashes() function is a built-in function in PHP. This function removes backslashes in a string. Syntax: stripslashes(string) Parameter: This function accepts only one parameter… Read More
The parse_str() function is a built-in function in PHP which parses a query string into variables. The string passed to this function for parsing is… Read More
The str_shuffle() function is an inbuilt function in PHP and is used to randomly shuffle all the characters of a string passed to the function… Read More
Reversing a string is one of the most basic string operations and is used very frequently by developers and programmers. PHP comes with a built-in… Read More
The strchr() function is a built-in function in PHP and is used to search for the first occurrence of a given string(say searchStr) in another… Read More

Start Your Coding Journey Now!