bidvertiser

Monday, September 8, 2008

PHP Contents (Continued)

PHP Strings.
•Strings can be specified using one of two sets of delimiters.
•If the string is enclosed in double-quotes ("), variables within the string will be expanded (subject to some parsing limitations).
•As in C the backslash ("\") character can be used in specifying special characters:



String manipulation functions.
•substr(,,[]);
•strlen();
•trim();
•ltrim(); // Trim left
•rtrim(); // Trim right
•strtolower();
•strtoupper();
•str_replace(,,,[]);
•strpos(, );
•strcmp(,); (Binary safe string comparison)
•strcasecmp(,); (Binary safe case-insensitive comparison)
•explode(,,[]); (Break string into array)
•implode(,); (Join array into string separated by delim)

No comments: