PHP String Functions

You are Here:

PHP String Functions

The following are the list of inbuilt string functions in PHP programming.

addcslashes()Adds backslashes before the specified characters in a given string.
addslashes()Adds backslashes before the characters that need to be escaped.
bin2hex()Converts a string of binary characters to hexadecimal values.
chop()Removes the whitespaces and other predefined characters from the right side of a string.
chr()Returns a character from the specified ASCII Code.
chunk_split()Splits a string into smaller chunks.
convert_cyr_string()Converts from one Cyrillic character set to another.
convert_uudecode()Decodes a uuencoded string.
convert_uuencode()Encodes a string.
count_chars()Returns information about characters used in a string.
crc32()Generates the cyclic redundancy checksum (CRC) polynomial of 32-bit lengths of the given string.
crypt()Encrypts a string using DES, Blowfish, MD5, or alternative algorithms that may be available on the system.
echo()Outputs all parameters without appending an additional newline.
explode()Splits a string by the given separator.
fprintf()Writes a formatted string to a specified output stream.
get_html_translation_table()Returns the translation table used by htmlspecialchars() and htmlentities() function.
hebrev()Converts logical Hebrew text to visual text.
hebrevc()Converts logical Hebrew text to visual text with newline conversion. It also converts new lines (\n) into <br>.
hex2bin()Decodes a hexadecimally encoded binary string.
html_entity_decode()Converts HTML entities to their corresponding characters.
htmlentities()Converts all applicable characters to HTML entities.
htmlspecialchars_decode()Converts special HTML entities back to characters.
htmlspecialchars()Converts special characters to HTML entities.
implode()Joins array elements with a string.
join()Joins array elements with a string. This function is an alias of implode() function.


Hi Developers, we almost covered 90% of String functions and Interview Question on PHP with examples for quick and easy learning.

We are working to cover every Single Concept in PHP.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author