You can create own function in PHP Language but , PHP has many predefined function like string function , array function , numeric function etc.
PHP all String functions as bellow table…
| Function | Description |
|---|---|
| addcslashes() | It returns a string with backslashes in front of the specific characters. |
| addslashes() | It returns a string with backslashes in front of predefined characters. |
| bin2hex() | It convert a string of ASCII characters to hexadecimal values. |
| chop() | It removes white space or other characters from the right end of a string. |
| chr() | It returns a character from a specific ASCII value. |
| chunk slit() | It split a string into the series of smaller parts. |
| convert cyr string() | It convert a string from one Cyrillic character-set to another character. |
| convert uudecode() | It decodes a uuencoded Character string |
| convert uuencode() | It encode a string using the uuencode . |
| count chars() | It returns information of characters use in a string. |
| crc32() | It calculates a 32-bit CRC for given a string. |
| crypt() | It one-way to string encryption (hashing). |
| echo() | It print string in webpage. |
| explode() | It break a string into an array. |
| fprintf() | It writes a formatted string to a specific output of stream. |
| hebrev() | It converts hebrew text to visual text. |
| hebrevc() | It convert Hebrew text to a visual text and new lines (\n) in . |
| hex2bin() | It converts hexadecimal values to ASCII characters of string. |
| html entity decode() | It convert HTML entities to characters . |
| htmlentities() | It convert characters to HTML entities and reverse of html entity decode(). |
| htmlspecialchars decode() | It convert some predefined HTML entities to characters. |
| htmlspecialchars() | It convert some predefined characters to HTML entities. |
| implode() | It returns a string of the elements of an array in php. |
| join() | It connect two or more string or word in php. |
| clfirst() | It converts the first character of the string to lowercase . |
| levenstein() | It return a Levenshtein distance between two strings. |
| localeconv() | It return local numeric and monetary formatting information . |
| ltrim() | It remove white space or other characters from the left side of a string. |
| md5() | It calculate the MD5 hash of the string. |
| md5 file() | It calculate the MD5 hash of the file. |
| metaphone() | It calculate the metaphone key of the string. |
| money format() | It return a string formatted as a currency string . |
| nl langinfo() | It return specified local information. |
| nl2br() | It insert HTML line breaks in front of every newline in a string. |
| number format() | It format a number with grouped thousands . |
| ord() | It return the ASCII value of the first character of a string. |
| parse str() | Parses any query string into a variables. |
| print() | It print string or word on webpage. |
| printf() | It print a formatted string . |
| quotemeta() | It quotes meta characters. |
| rtrim() | It removes white space or other characters from the right side of a string. |
| setlocale() | It set a locale information. |
| sha1() | It calculate the SHA-1 hash of an string . |
| sha1 file() | It calculate the SHA-1 hash of the file. |
| similar text() | It calculate of the similarity between two strings. |
| soundex() | It calculates the soundex key of the string. |
| sprintf() | It write a formatted string to a variable . |
| sscanf() | It parses input from a string according to a format. |
| str qetcsv() | It parses a CSV string into a array |
| str ireplace() | It replaces some characters in a string or case-insensitive . |
| str pad() | It pads a string to a new length. |
| str repeat() | It repeats a string a specific number of times. |
| str replace() | It replace some characters in a string or case-sensitive . |
| str rot13() | It performs the ROT13 encoding on a string . |
| str shuffle() | It randomly shuffles all characters in a string . |
| str split() | It use for split a string into an array. |
| str word count() | It count the number of words in the string. |
| strcasecmp() | It compares two strings or case-insensitive . |
| strchr() | It find the first occurrence of a string inside another a string ( that alias of strstr()) |
| strcmp() | It compares two strings or case-sensitive . |
| strcoll() | It also compares two strings but locale based string comparison . |
| strcspn() | It return the number of characters found in a string before any part of some specific characters are founds . |
| strip tags() | It strips HTML and PHP tags from the string. |
| stripcslashes() | It unquotes a string quote with addcslashes function . |
| stripslashes() | It unquotes a string quoted with addslashes function. |
| stripos() | It returns the position of the first incident of a string inside another a string. |
| stristr() | It finds the first incident of a string inside another a string (case-insensitive). |
| strlen() | It return the length of a given string. |
| strnatcasecmp() | to compares a two strings using a ” natural order ” algorithm (case-insensitive). |
| strnatcmp() | to compares a two strings using a ” natural order ” algorithm (case-sensitive). |
| strncasecmp() | It use for string comparison of the first n characters (case-insensitive). |
| strncmp() | It use for string comparison of the first n characters (case-sensitive). |
| strpbrk() | It searches a string for any of set of characters. |
| strpos() | It returns the position of the first incident of a string inside another string (case-sensitive). |
| strrchr() | It find the last occurrence of a string inside another a string. |
| strrev() | It give to reverses a given string. |
| strripos() | It find the position of the last occurrence of a string inside another a string. |
| strrpos() | It find the position of the last occurrence of a string inside another a string. |
| strspn() | It return the number of characters found in a string that contains only characters from a specified charlist. |
| strstr() | It find the first phenomenon of a string inside another string (case-sensitive). |
| strtok() | to split a string into smaller strings. |
| strtolower() | It converts a string into lowercase letters. |
| strtoupper() | It converts a string into uppercase letters. |
| strtr() | It translates certain characters in a given string. |
| substr() | It return a specific character in given string. |
| substr compare() | to compares two strings from a specific start position (binary safe and optionally case-sensitive). |
| substr count() | It count the number of times a substring occurs in a string. |
| substr replace() | It replaces a part of a string with another a string . |
| trim() | to removes whites pace or other characters from both sides left and right side of a string . |
| ucfirst() | to convert the first character of a given string to uppercase letter. |
| ucwords() | to converts the first character of each word in a string to uppercase letter. |
| vfprintf() | to writes a formatted string to a specified output stream. |
| vprintf() | It returns output in formatted string . |
| vsprintf() | to writes a formatted a string to a variable. |
| wordwrap() | to wraps a string to a given number of a characters. |
No comments:
Post a Comment