PHP Basic Functions
Function | Description |
array() | Creates an array |
array_push() | Inserts one or more elements to the end of an array |
shuffle() | Shuffles an array |
sizeof() | Alias of count() |
sort() | Sorts an array |
count() | Counts elements in an array, or properties in an object |
uasort() | Sorts an array with a user-defined function and maintain index association |
date() | Formats a local time/date |
getdate() | Returns an array that contains date and time information for a Unix timestamp |
mktime() | Returns the Unix timestamp for a date |
strftime() | Formats a local time/date according to locale settings |
strptime() | Parses a time/date generated with strftime() |
time() | Returns the current time as a Unix timestamp |
chdir() | Changes the current directory |
dir() | Opens a directory handle and returns an object |
addcslashes() | Returns a string with backslashes in front of the specified characters |
addslashes() | Returns a string with backslashes in front of predefined characters |
echo() | Outputs strings |
explode() | Breaks a string into an array |
fprintf() | Writes a formatted string to a specified output stream |
htmlentities() | Converts characters to HTML entities |
htmlspecialchars_decode() | Converts some predefined HTML entities to characters |
htmlspecialchars() | Converts some predefined characters to HTML entities |
implode() | Returns a string from the elements of an array |
trim() | Strips whitespace from the left side of a string |
md5() | Calculates the MD5 hash of a string |
nl2br() | Inserts HTML line breaks in front of each newline in a string |
print() | Outputs a string |
printf() | Outputs a formatted string |
sprintf() | Writes a formatted string to a variable |
str_repeat() | Repeats a string a specified number of times |
str_replace() | Replaces some characters in a string (case-sensitive) |
str_shuffle() | Randomly shuffles all characters in a string |
str_split() | Splits a string into an array |
str_word_count() | Count the number of words in a string |
strchr() | Finds the first occurrence of a string inside another string (alias of strstr()) |
strcmp() | Compares two strings (case-sensitive) |
strip_tags() | Strips HTML and PHP tags from a string |
stripcslashes() | Unquotes a string quoted with addcslashes() |
stripslashes() | Unquotes a string quoted with addslashes() |
stripos() | Returns the position of the first occurrence of a string inside another string (case-insensitive) |
strtolower() | Converts a string to lowercase letters |
strtoupper() | Converts a string to uppercase letters |
substr() | Returns a part of a string |
substr_compare() | Compares two strings from a specified start position (binary safe and optionally case-sensitive) |
substr_count() | Counts the number of times a substring occurs in a string |
substr_replace() | Replaces a part of a string with another string |
ucfirst() | Converts the first character of a string to uppercase |
ucwords() | Converts the first character of each word in a string to uppercase |
wordwrap() | Wraps a string to a given number of characters |
mail() | Allows you to send emails directly from a script |
PHP MySQL Functions
|
Comments
Post a Comment