PHP DAY 9 (String Manipulating Functions)

DAY 9

PHP  String Manipulating Functions

The PHP string functions are part of the PHP core. No installation is required to use these functions.

Function
Description
Returns a string with backslashes in front of the specified characters
Returns a string with backslashes in front of predefined characters
Converts a string of ASCII characters to hexadecimal values
Removes whitespace or other characters from the right end of a string
Returns a character from a specified ASCII value
Splits a string into a series of smaller parts
Converts a string from one Cyrillic character-set to another
Decodes a uuencoded string
Encodes a string using the uuencode algorithm
Returns information about characters used in a string
Calculates a 32-bit CRC for a string
One-way string hashing
Outputs one or more strings
Breaks a string into an array
Writes a formatted string to a specified output stream
Returns the translation table used by htmlspecialchars() and htmlentities()
Converts Hebrew text to visual text
Converts Hebrew text to visual text and new lines (\n) into <br>
Converts a string of hexadecimal values to ASCII characters
Converts HTML entities to characters
Converts characters to HTML entities
Converts some predefined HTML entities to characters
Converts some predefined characters to HTML entities
Returns a string from the elements of an array
Alias of implode()
Converts the first character of a string to lowercase
Returns the Levenshtein distance between two strings
Returns locale numeric and monetary formatting information
Removes whitespace or other characters from the left side of a string
Calculates the MD5 hash of a string
Calculates the MD5 hash of a file
Calculates the metaphone key of a string
Returns a string formatted as a currency string
Returns specific local information
Inserts HTML line breaks in front of each newline in a string
Formats a number with grouped thousands
Returns the ASCII value of the first character of a string
Parses a query string into variables
Outputs one or more strings
Outputs a formatted string
Converts a quoted-printable string to an 8-bit string
Converts an 8-bit string to a quoted printable string
Quotes meta characters
Removes whitespace or other characters from the right side of a string
Sets locale information
Calculates the SHA-1 hash of a string
Calculates the SHA-1 hash of a file
Calculates the similarity between two strings
Calculates the soundex key of a string
Writes a formatted string to a variable
Parses input from a string according to a format
Parses a CSV string into an array
Replaces some characters in a string (case-insensitive)
Pads a string to a new length
Repeats a string a specified number of times
Replaces some characters in a string (case-sensitive)
Performs the ROT13 encoding on a string
Randomly shuffles all characters in a string
Splits a string into an array
Count the number of words in a string
Compares two strings (case-insensitive)
Finds the first occurrence of a string inside another string (alias of strstr())
Compares two strings (case-sensitive)
Compares two strings (locale based string comparison)
Returns the number of characters found in a string before any part of some specified characters are found
Strips HTML and PHP tags from a string
Unquotes a string quoted with addcslashes()
Unquotes a string quoted with addslashes()
Returns the position of the first occurrence of a string inside another string (case-insensitive)
Finds the first occurrence of a string inside another string (case-insensitive)
Returns the length of a string
Compares two strings using a "natural order" algorithm (case-insensitive)
Compares two strings using a "natural order" algorithm (case-sensitive)
String comparison of the first n characters (case-insensitive)
String comparison of the first n characters (case-sensitive)
Searches a string for any of a set of characters
Returns the position of the first occurrence of a string inside another string (case-sensitive)
Finds the last occurrence of a string inside another string
Reverses a string
Finds the position of the last occurrence of a string inside another string (case-insensitive)
Finds the position of the last occurrence of a string inside another string (case-sensitive)
Returns the number of characters found in a string that contains only characters from a specified charlist
Finds the first occurrence of a string inside another string (case-sensitive)
Splits a string into smaller strings
Converts a string to lowercase letters
Converts a string to uppercase letters
Translates certain characters in a string
Returns a part of a string
Compares two strings from a specified start position (binary safe and optionally case-sensitive)
Counts the number of times a substring occurs in a string
Replaces a part of a string with another string
Removes whitespace or other characters from both sides of a string
Converts the first character of a string to uppercase
Converts the first character of each word in a string to uppercase
Writes a formatted string to a specified output stream
Outputs a formatted string
Writes a formatted string to a variable
Wraps a string to a given number of characters

 

 

No comments:

Post a Comment

Give your valuable feedback

Topic :Software & Types, Subject: Computer Fundamental Notes for CSJM University Kanpur(for different courses like BBA, BCA, etc..)

Software Software refers to the programs, data, and instructions that enable a computer or other digital device to perform specific tasks or...