Skip to content

Tag Archives: PHP-string

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
The str_ireplace() is a built-in function in PHP and is used to replace all the occurrences of the search string or array of search strings… Read More
The bin2hex() function in PHP converts a string to hexadecimal values. The conversion is done byte-wise with the high-nibble first. Note: It is not for… Read More
The similar_text() function is a built-in function in PHP. This function calculates the similarity of two strings and returns the number of matching characters in… Read More
The substr_count() is a built-in function in PHP and is used to count the number of times a substring occurs in a given string. The… Read More
The strncasecmp() function is a built-in function in PHP and is used to compare two given strings. It is case-insensitive. This function is similar to… Read More
The str_pad() function is a built-in function in PHP and is used to pad a string to a given length. We can pad the input… Read More
The addcslashes() function is a built-in function in PHP. The addcslashes() function is used to add backslashes before some specified characters in a given string.… Read More