String Functions

Function Returns Description
addslashes(string) String Adds escape slashes to the string.
bin2hex(string) String Converts the binary string into a hexadecimal string.
chop(string) String Removes trailing whitespace.
chr(ascii) String Returns the character for the ASCII code.
chunk_split(string, [chunk_len], [end]) String Splits the string into smaller chunks by inserting the character end at every specified chunk_len.
convert_cyr_string(string, from, to) String Converts the string from one Cyrillic set to another.
crypt(string, [salt]) String DES-encrypts the string using the salt value.
echo(string) void Outputs a string to the screen.
explode(separator, string) Array Splits the string into an array.
flush() void Flushes the output buffer.
get_meta_tags(filename, [include_path]) Array Gets an array of all the META tags from the specified file.
htmlentities(string) String Converts the string into an HTML entity.
htmlspecialchars(string) String Converts any HTML special characters in the string into a HTML entitity.
implode(delimiter, array) String Does the exact opposite of the explode function. It joins the array into a single string using the specified delimiter.
join(delimiter, array) String Joins the array into a single string using the specified delimiter.
ltrim(string) String Strips the white space from the beginning of the string.
md5(string) String Calculates the MD5 hash of the specified string.
nl2br(string) String Inserts the <BR> tag before all the line breaks in the string.
ord(string) int Returns the specified ASCII value of the first letter of the string.
parse_str(string) void Parses the string into variables like it was a query string.
print(string) Integer Prints the specified string.
printf(string, [arg]) void Outputs a formatted string.
quoted_printable_decode(string) String Converts a quoted printable string to a 8-bit string.
QuoteMeta(string) String Escapes meta characters in the string.
rawurldecode(string) String Decodes a URL-encoded string.
rawurlencode(string) String Encodes a string to a URL-encoded string.
setlocale(category, locale) String Sets the locale information for functions in the specified category.
similar_text(string1, string2, [percent]) int Calculates the similarity between string1 and string2.
soundex(string) String Calculates the soundex key for the string.
sprintf(format, [args]) string) String Returns a formatted string.
str_replace(pattern, replacement, String Replaces all occurrences of pattern with replacement in string.
strchr(string1, string2) String Finds the first occurrence of string2 in string1.
strcmp(string1, string2) int Compares string1 against string2.
strcpsn(string1, string2) int Returns the number of characters in the beginning of string1that do not match the beginning of the characters in string2.
strip_tags(string) String Strips all the HTML and PHP tags from the specified string.
stripslashes(string) String Strips all escape character slashes from the string.
strlen(string) int Returns the length in characters of the string.
strpos(stirng1, string2) int Finds the first occurrence of string2 in string1.
strrev(string) String Returns the specified string in reverse order.
strrpos(string1, string2) int Finds the last occurrence of string2 in string1.
strstr(string1, string2) String Finds the first occurrence of string2 in string1.
strtok(sring1, string2) String Tokenizes string1 into segments separated by string2.
strtolower(string) String Converts all characters in the string to lowercase.
strtoupper(string) String Converts all characters in the string to uppercase.
strtr(string, from, to) String Replaces all occurrences of from in string with to.
substring(string, start, [length]) String Returns the characters in string from the specified start point.
ucfirst(string) String Converts the first character of the string to uppercase.
ucwords(string) String Converts the first character of each word to uppercase.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset