String functions in PHP

Function(Parameters)
Description
Strips Whitespace From the Left Side of a String
Strips Whitespace From the Right Side of a String
Strips Whitespace From Both Sides of a String
Makes a String's First Character Lowercase
Makes a String's First Character Uppercase
Converts a String to Lowercase Letters
Converts a String to Uppercase Letters
Count the Number of Words In a String
Makes the First Character of Each Word In a String Uppercase
Wraps a String to a Given Number of Characters (Default Width: 75) (Default Break: \n)
Returns How Many Times an ASCII Character Occurs Within a String & Returns the Information
Counts the Number of Times a Substring Occurs In a String
Returns the Length of a String
Returns a Part of a String (Start Value of "0" to Begin at First Character)
Reverses a String
Randomly Shuffles All Characters In a String
Repeats a String a Specified Number of Times ("Repeat" Is Number of Times to Repeat)
Searches a String For Any of a Set of Characters
Replaces Some Characters In a String (Case-Sensitive)
Replaces a Part of a String With Another String
Finds the First Occurrence of a String Inside Another String (Case-Insensitive)
Finds the First Occurrence of a String Inside Another String (Case-Sensitive)
Finds the Last Occurrence of a String Inside Another String
Returns the Position of the First Occurrence of a String Inside Another String (Case-Insensitive)
Returns the Position of the First Occurrence of a String Inside Another String (Case-Sensitive)
Returns the Position of the Last Occurrence of a String Inside Another String (Case-Insensitive)
Returns the Position of the Last Occurrence of a String Inside Another String (Case-Sensitive)
Compares Two Strings (Case-Insensitive)
Compares Two Strings (Case-Sensitive)
Splits a String Into Smaller Strings
Splits a String Into a Series of Smaller Parts (Default Length Is 76)
Splits a String Into an Array
Breaks a String Into an Array
Returns a String From the Elements of an Array

ltrim(string)



O/P



rtrim(string)


O/P



trim(string)


O/P




lcfirst(string)

ucfirst(string)

strtolower(string)

strtoupper(string)

str_word_count(string)

count_chars(string,.mode)

substr_count(string,substring)

strlen(string)

substr(string,start)

srrrev(string)

str_shuffle(string)

str_repeat(string,repeat)

str_replace(find,replace,string)

stristr(string,search)

strrchar(string,char)

chunk_split(string,length)





O/P



strpos(string,find)

strripos(string,find)

strcmp(string1,string2)

strpbrk(string,character)

strncmp(string1,string2,length)

implode(separator,Array)

explode(separator,string)

str_split(string,split)

subtok(string,start)



O/P

String functions in PHP String functions in PHP Reviewed by Unknown on 22:43:00 Rating: 5

No comments: