# Function
# Example
# Output
# Description
addcslashes( $string, $find )
addcslashes( 'Hello world', 'w')
Hello \world
Add back slash before $find
chop( $string )
chop( 'Hello world
' )
Hello world
Remove white space of returned string: "\n", "\t"
explode( $find, $string )
explode( ' ', 'Hello world' )
Array ( [0] => Hello [1] => world )
Create array from $string seprate where $find finded!
ucwords( $string )
ucwords( 'Hello world' )
Hello World
UpperCase all word in $srting
strtoupper( $string )
strtoupper( 'Hello world' )
HELLO WORLD
UpperCase all letters in $srting
strtolower( $string )
strtolower( 'Hello world' )
hello world
LowerCase all letters in $srting
str_word_count( $string )
str_word_count( 'Hello world' )
2
Return counts of $srting
strrev( $string )
strrev( 'Hello world' )strrev( 'Hello world' )
dlrow olleH
Reverse $string
str_repeat( $string, $count )
str_repeat( 'Hello world', 4 )
Hello worldHello worldHello worldHello world
Repeat $string $count times
trim( $string, $charlist )
trim( 'Hello world', 'Hd' )
ello worl
Remove $charlist from $string
substr( $string, $offset )
substr( 'Hello world', 3 )
lo world
Return rest of $string from positive or negetive $offset to end
strpbrk( $string, $find )
strpbrk( 'Hello world', 'el' )
ello world
Return rest of $string from $find to end
strlen( $string )
strlen('Hello world')
11
Return the length of $string's character
stripos( $string, $find )
stripos('Hello world', 'world)
6
Find the position of the first occurrence of $find inside the $string:
stristr( $string, $find )
stristr("Hello beautiful world!", "beautiful")
beautiful world!
Find the $find inside the $string and return rest of $string
strchr( $string, $find )
strchr("Hello world!", "w")
world!
Find the $find inside the $string and return rest of $string
str_replace( $find, $replace, $string, $count)
str_replace( "beautiful", "my", "Hello beautiful world!" );
Hello my world!
function for replace $replace instead of $find in $string for $count times!
parse_str( $specific_string, $array_name )
parse_str( "name=Peter&age=43", $array_name );
print_r( $array_name );
Array ( [name] => Peter [age] => 43 )
function parses a query string($specific_string) into $array_name