Haifa linux club:PHP lecture
Prev Next

string functions

(partial list)
chop - Strip whitespace from the end of a string
chr - Return a specific character
crypt - DES-encrypt a string
hebrev - Convert logical Hebrew text to visual text
htmlspecialchars - Convert special characters to HTML entities
md5 - Calculate the md5 hash of a string
nl2br - Inserts HTML line breaks before all newlines in a string
ord - Return ASCII value of character
sprintf - Return a formatted string
strip_tags - Strip HTML and PHP tags from a string
addslashes - Quote string with slashes
stripslashes - Un-quote string quoted with addslashes()
strlen - Get string length
strpos - Find position of first occurrence of a string
strrev - Reverse a string
strtolower - Make a string lowercase
strtoupper - Make a string uppercase
str_replace - Replace all occurrences of the search string with the replacement string
join - Join array elements with a string
split - split string into array by regular expression
"04/30/1973";  // Delimiters may be slash, dot, or hyphen
list ($month$day$year) = split ('[/.-]'$date);
"Month: $month; Day: $day; Year: $year<br>\n";