Category: PHP

Php tutorials for beginners with example

sprintf – PHP String Functions

Syntax : sprintf ( string_format, arg1, arg2, arg3… ); Description : The sprintf() function output a formatted string. Output will come according to the string_format. The arg1, arg2, ++ parameters will...

Php tutorials for beginners with example

setlocale – PHP String Functions

Syntax : setlocale ( category, locale ); Description : The setlocale() function sets the locale information. Locale information is currency format, currency symbol, language, monetary, time and other information specific for a...

Php tutorials for beginners with example 0

printf – PHP String Functions

Syntax : printf ( string_format, arg1, arg2, arg3… ); Description : The printf() function output a formatted string. Output will come according to the string_format. The arg1, arg2, ++ parameters will...

Php tutorials for beginners with example

quotemeta – PHP String Functions

Syntax : quotemeta ( string ); Description : The quotemeta() function adds backslashes in front of below characters. The predefined characters are: period (.) backslash (\) plus sign (+) asterisk (*)...

Php tutorials for beginners with example

quoted_​printable_​decode – PHP String Functions

Syntax : quoted_​printable_​decode ( string ); Description : The quoted_​printable_​decode() function decodes a quoted-printable string to an 8-bit string. This function returns an 8-bit binary string corresponding to the decoded quoted...

Php tutorials for beginners with example

quoted_​printable_​encode – PHP String Functions

Syntax : quoted_​printable_​encode ( string ); Description : The quoted_​printable_​encode() function convert a 8 bit string to a quoted-printable string. Quoted printable string is created according to » RFC2045, section 6.7. It is same...

Php tutorials for beginners with example

print – PHP String Functions

Syntax : print ( strings ); Description : The print() function outputs one or more strings. It is not actually a real function (it is a language construct) so you are...

Php tutorials for beginners with example

parse_​str – PHP String Functions

Syntax : parse_​str ( stringto_encode, array ); Description : The parse_​str() function parses a query string into variables. Parses stringto_encode, as if it were the query string passed via a URL and...

Php tutorials for beginners with example

ord – PHP String Functions

Syntax : ord ( string ); Description : The ord() function calculates the ASCII value of first character of a string. This will convert the first byte of a string to...

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...