php Programming
php Applications
MySQL Database
php-MySQL
cakePHP & Joomla
PL-SQL & PHP
Related projects
© The scientific sentence. 2010
|
String functions
string addcslashes ( string $str , string $charlist )
Returns a string with backslashes before characters that are
listed in charlist parameter.
string addslashes ( string $str )
Returns a string with backslashes before characters that need
to be quoted in database queries etc. These characters are single
quote ('), double quote ("), backslash () and NUL (the NULL byte).
magic_quotes_gpc
Sets the magic_quotes state for GPC (Get/Post/Cookie) operations.
When magic_quotes are on, all ' (single-quote), " (double quote),
(backslash) and NUL's are escaped with a backslash automatically.
string bin2hex ( string $str )
Returns an ASCII string containing the hexadecimal representation
of the parameter $str.
chop: alias of rtrim()
string rtrim ( string $str [, string $charlist ] )
Returns a string with whitespace stripped from the end of str.
Without the second parameter, rtrim() will strip these characters:
- " (ASCII 32 (0x20)), an ordinary space.
- "t" (ASCII 9 (0x09)), a tab.
- "n" (ASCII 10 (0x0A)), a new line (line feed).
- "r" (ASCII 13 (0x0D)), a carriage return.
- " " (ASCII 0 (0x00)), the NUL-byte.
- "x0B" (ASCII 11 (0x0B)), a vertical tab.
string chr ( int $ascii )
Returns a one-character string containing the character
specified by ascii.
string chunk_split ( string $body [, int $chunklen [, string $end ]] )
Can be used to split a string into smaller chunks.
string convert_cyr_string ( string $str , string $from , string $to )
Converts from one Cyrillic character set to another.
string convert_uudecode ( string $data )
Decodes a uuencoded string.
mixed count_chars ( string $string [, int $mode ])
Counts the number of occurrences of every byte-value (0..255) in
string and returns it in various ways.
int crc32 ( string $str)
Generates the cyclic redundancy checksum polynomial of 32-bit lengths
of the str.
string crypt (string $str [, string $salt ])
Returns an encrypted string.
void echo ( string $arg1 [, string $... ])
Outputs all parameters.
array explode (string $delimiter , string $string [, int $limit ])
Returns an array of strings formed by splitting the given string on
boundaries formed by the string delimiter.
int fprintf (resource $handle , string $format[, mixed $args [, mixed $... ]])
Write a string produced according to format to the stream resource specified
by handle. Returns the length of the string written.
array get_html_translation_table ([ int $table [, int $quote_style ]])
Returns the translation table that is used internally for htmlspecialchars()
and htmlentities().
string html_entity_decode (string $string [, int $quote_style [, string $charset ]])
It is the opposite of htmlentities() in that it converts all HTML entities
to their applicable characters from string.
string htmlentities (string $string [, int $quote_style
[, string $charset [, bool $double_encode ]]])
It' is identical to htmlspecialchars(), except with htmlentities(), all
characters which have HTML character entity equivalents are translated
into these entities.
Input:
<php
$phrase = "It's not <b>logical</b> to "see && not to see"
at the same instant.";
$a = htmlentities($phrase);
$b = html_entity_decode($a);
echo $a;
echo "<br />";
echo $b;
?&t;
Outputs:
It's not <b>logical</b> to "see && not to see" at the
same instant.
It's not logical to "see && not to see" at the same instant.
string htmlspecialchars_decode (string $string [, int $quote_style)
It's the opposite of htmlspecialchars(). It converts special HTML entities
back to characters.
The converted entities are: &, " (when ENT_NOQUOTES is not set),
' (when ENT_QUOTES is set), < and >.
string implode ( string $glue , array $pieces )
Alias of join, joins array elements within a string.
|
|
|