levenshtein() function in PHP

George John
Published on 16-Oct-2018 17:58:33
The levenshtein() function is used calculate Levenshtein distance between two strings. The Levenshtein distance is the number of characters you have to replace, insert or delete to transform first string into second string. This function is not case-sensitive. Syntax levenshtein(str1, str2, insert, replace, delete) Parameters str1 ... Read More

join() function in PHP

Arjun Thakur
Published on 16-Oct-2018 17:56:42
The join() function is alias of implode(). It returns string from the elements of an array.Syntaxjoin(separator, arr)Parametersseparator  − It specifies what to put between the array elements. The default is ""arr  − Array to join to a stringReturnThe join() function returns a string from elements of an array.ExampleThe following is ... Read More

htmlspecialchars() function in PHP

Ankith Reddy
Published on 16-Oct-2018 17:53:45
The htmlspecialchars() function is used to convert special characters to HTML entities.The predefined characters are −& (ampersand) becomes & amp;" (double quote) becomes & quot;' (single quote) becomes & #039;< (less than) becomes & lt;> (greater than) becomes & gt;Syntaxhtmlspecialchars(str, flags, character-set, double_encode)Parametersstr  − The string to convert.flags  −How to ... Read More

htmlentities() function in PHP

Chandu yadav
Published on 16-Oct-2018 17:49:17
The htmlentities is used to convert all applicable characters to HTML entities.Syntaxhtmlentities(str, flags, character-set, double_encode)Parametersstr  − The string to convert.flags  −How to handle quotes, invalid encoding and the used document type.The following are the available quote styles −ENT_COMPAT  − Default. Encodes only double quotesENT_QUOTES  − Encodes double and single quotesENT_NOQUOTES  ... Read More

hex2bin() function in PHP

Ankith Reddy
Published on 16-Oct-2018 17:47:57
The hex2bin() function is used to convert a string of hexadecimal to ASCII character. Syntax hex2bn(str) Parameters str − The hexadecimal value to be converted Return The hex2bin() function returns the ASCII character of the converted string, or FALSE on failure. Example The following is an ... Read More

hebrev() function in PHP

Arjun Thakur
Published on 16-Oct-2018 17:45:41
The hebrev() function is used to convert logical Hebrew text to visual text. The function converts Hebrew text from a right-to-left flow to a left-to-right flow. Syntax hebrev(str, maxcharline) Parameters str − Hebrew input string maxcharline − The maximum number of characters per line that will ... Read More

fprintf() function in PHP

George John
Published on 16-Oct-2018 17:43:36
The fprintf() function is used to write a formatted string to a streamSyntaxfprintf (stream, format, argument1, argument2, ... )Parametersstream − Where to write/output the stringformat − Specifies the string and how to format the variables in it.The following are the possible format values −%%  − Returns a percent sign%b  − ... Read More

echo() function in PHP

Chandu yadav
Published on 16-Oct-2018 17:39:40
The echo() function outputs one or more strings.Note − echo() function is faster than print().Syntaxecho(str)Parametersstr − string to be sent to the outputReturnThe echo() function returns nothing.ExampleThe following is an example: − Live Demo<?php    echo "Welcome!"; ?>OutputWelcome!ExampleLet us see another example − Live Demo<?php    $str1 = "Welcome!";    $str2 = ... Read More

crc32() function in PHP

Ankith Reddy
Published on 16-Oct-2018 17:37:30
The crc32() function is used to calculate 32-bit CRC. You can use the function to validate data integrity.Syntaxcrc32(str)Parametersstr  − The stringReturnThe crc32() function returns the crc32 checksum of string as an integer.ExampleThe following is an example − Live Demo<?php    $res = crc32("This is demo text!");    printf("%u\n", $res); ?>Output2903462745ExampleLet us ... Read More

convert_uudecode() function in PHP

Arjun Thakur
Published on 16-Oct-2018 17:35:56
The convert_uudecode() function is used to decode a encoded string. Syntax convert_uudecode(data) Parameters data − The uudecode data Return The convert_uudecode() function returns the decoded data as a string or else false on failure. Example The following is an example − Live Demo <?php ... Read More
Advertisements