Author: jyoti rani

Php tutorials for beginners with example

nl_​langinfo – PHP String Functions

Syntax : nl_​langinfo ( item ); Description : nl_​langinfo() function returns the locale information. nl_langinfo() is used to access individual elements of the locale categories. localeconv(), which returns all of the elements, nl_langinfo() allows you to...

Php tutorials for beginners with example 0

money_format – PHP String Functions

Syntax : money_format ( format, number ); Description : The money_format() function formats a number to a currency string. This function inserts a formatted number where there is a percent (%)...

Php tutorials for beginners with example

metaphone – PHP String Functions

Syntax : metaphone ( string, key_length ) Description : metaphone() function calculates the metaphone key of string. A metaphone key represents how a string sounds if said by an English speaking person. It can...

Php tutorials for beginners with example

md5 – PHP String Functions

Syntax : md5 ( string, raw_output ); Description : The md5() function calculates the MD5 hash of a string. The md5() function uses the RSA Data Security, Inc. MD5 Message-Digest Algorithm and...

Php tutorials for beginners with example

md5_​file – PHP String Functions

Syntax : md5_file ( file_name, raw_output ); Description : The md5_file() function calculates the MD5 hash of a file. The md5_file() function uses the RSA Data Security, Inc. MD5 Message-Digest Algorithm....

Php tutorials for beginners with example

localeconv() – PHP String Functions

Syntax : localeconv ( ) Description : It’s an inbuilt function of PHP. localeconv() function will Get numeric formatting information. Output : localeconv() returns data based upon the current locale as set...

Php tutorials for beginners with example

levenshtein() – PHP String Functions

Syntax : levenshtein ( string1, string2) OR levenshtein ( string1, string2, char_ins , char_rep , char_del) Description : It’s an inbuilt function of PHP. levenshtein() function will calculate Levenshtein distance between two...

Php tutorials for beginners with example 0

htmlspecialchars_decode() – PHP String Functions

Syntax : htmlspecialchars_decode ( strings, flags ); Description : htmlspecialchars_decode() function will converts some predefined HTML entities back to characters. Here is the list of predefined characters. The converted entities are: & &...

Php tutorials for beginners with example 0

get_html_translation_table – PHP String Functions

Syntax : get_html_translation_table ( strings, flags, encoding/character-set ); Description : get_html_translation_table() function returns the translation table used by htmlspecialchars() and htmlentities(). Note : htmlentities() function is reverse of it. Parameter : strings – This...

Php tutorials for beginners with example 0

fprintf – PHP String Functions

Syntax : fprintf ( stream_handle, string_format, arg1, arg2, arg3… ); Description : fprintf() function writes a formatted string to a stream. Stream specified by stream_handle. Write a string produced according to string_format...

Php tutorials for beginners with example 0

crypt – PHP String Functions

Syntax : string crypt ( string, salt ); Description : It is One-way string hashing. The crypt() function returns hashed string on the basis of algorithms i.e Standard DES-based hash,  Extended DES-based hash,MD5...

Php tutorials for beginners with example

strtok – PHP String Functions

Syntax : string strtok ( string, token ); OR string strtok ( token ); Description : It’s an inbuilt function of PHP. strtok() function Tokenize string or we can say splits a string...

Php tutorials for beginners with example

strrev() – PHP String Functions

Syntax : string strrev ( string ); Description : It’s an inbuilt function of PHP. As its name implies, strrev() function will reverse the string. Parameter : [table caption=”” width=”100%” colwidth=”15%|15%|15%|55%”...

Php tutorials for beginners with example

strrchr() – PHP String Functions

Syntax : string strrchr ( string, char_string ); Description : strrchr() function will find the last occurrence of char_string in a string and returns all characters from this position to the end...

Php tutorials for beginners with example

strpbrk() – PHP String Functions

Syntax : string strpbrk ( string, char_list ); Description : strpbrk() function will  searches a string for any of the specified characters. Note : case-sensitive function. Parameter : [table caption=”” width=”100%”...

Php tutorials for beginners with example

strncmp() – PHP String Functions

Syntax : int strncmp ( string1, string2, length ); Description : strncmp() function will compare two strings. This is case-sensitive function. Note : Binary safe and case-sensitive function. Tip :  strncmp()  is...

Php tutorials for beginners with example

strncasecmp – PHP String Functions

Syntax : int strncasecmp ( string1, string2, length ); Description : strncasecmp() function will compare two strings. Note : Binary safe case-insensitive string comparison function. Tip : This function is similar to...

Php tutorials for beginners with example

strnatcmp – PHP String Functions

Syntax : int strnatcmp ( string1, string2 ); Description : It’s an inbuilt function of PHP. strnatcmp() function compares the two strings  using a “natural” algorithm. Note: This function is  binary-safe and...

Php tutorials for beginners with example

strnatcasecmp – PHP String Functions

Syntax : int strnatcasecmp ( string1, string2 ); Description : It’s an inbuilt function of PHP. strnatcasecmp() function compares the two strings  using a “natural” algorithm. In a natural algorithm, the...

Php tutorials for beginners with example

strlen – PHP String Functions

Syntax : int strlen ( string ); Description : It’s an inbuilt function of PHP. The strlen() function returns the length of a string. Parameter : [table caption=”” width=”100%” colwidth=”15%|15%|15%|55%” colalign=”left|left|left|left”]...