MCQs Test!! VB Basic Test !! Essentials of VB !! Creating User Services !! function !! Anatomy !! GK March-2019 !! DATA TYPES IN JAVA !! Classes ,Constructor ,Methods,Inheritance !! Ecology-I !! Biology 2019 !! Gk april 2019 !! Biology (living world) !! Plant anatomy !! CELL STRUCTURES AND FUNCTION !! General biology !! Human physiology !! Data structure !! Ecology-II !! GK TEST !! Reproduction in plants !! Human reproduction !! The ABC of C !! Operating system set1 !! Operating system set2 !! Gk and current affairs !! Animal kingdom !! Number system !! Animal kingdom-II !! Gk TEST-III !! Number series !! Microorganisms !! Interview question in c !! Time and Work !! Percentage !! General history !! Average !! Cells !! Locomotion and Movement !! paging !! Bacteriology !! Page replacement policy !! Secondary memory and Disk scheduling !! Introduction of Nervous System and neurons !! Plant harmones !! Transport and Mineral Nutrition in Plants !! Neurotransmitters !! Modern Indian History !! Photosynthesis in Plants !! Modern Indian History-II !! Plant respiration !! Environment & Biodiversity !! Environment & Biodiversity - II !! Algae, Bryophytes, Pteridophytes !! Area !! Cricket !! Days of the Year (India and the World) !! Plant Pathology - I !! Indian Transport System !! Plant Pathology - II !! Aptitude !! Biology !! Botany !! C language !! Computer Science !! Core Java !! Gate !! GK !! Mysql !! Operating system !! Physics !! VB-Visual Basic !! Zoology

PHP Programing language

String Function in PHP
Previous Home Next

String Function

String functions are used  to manipulate a string or query information about a string. Some important String Functions are:

Some of the String functions are as follows:

Function Name Description
addcslashes() Returns a string with backslashes in front of the specified characters
addslashes() Returns a string with backslashes in front of predefined characters
bin2hex() Converts a string of ASCII characters to hexadecimal values
chop() Removes whitespace or other characters from the right end of a string
chr() Returns a character from a specified ASCII value
chunk_split() Splits a string into a series of smaller parts
crypt() One-way string encryption (hashing)
echo() Output one or more strings.
explode() Breaks a string into an array
fprintf() Writes a formatted string to a specified output stream
hex2bin() Converts a string of hexadecimal values to ASCII characters
htmlentities() Converts characters to HTML entities
implode() Returns a string from the elements of an array
join() Alias of implode()
lcfirst() Converts the first character of a string to lowercase
ltrim() Removes whitespace or other characters from the left side of a string
parse_str() Parses a query string into variables
print() Outputs one or more strings
printf() Outputs a formatted string
rtrim() Removes whitespace or other characters from the right side of a string
sprintf() Writes a formatted string to a variable
sscanf() Parses input from a string according to a format
str_replace() Replaces some characters in a string (case-sensitive)
str_split() Splits a string into an array
stripos() Returns the position of the first occurrence of a string inside another string (case-insensitive)
strlen() Returns the length of a string
strncmp() String comparison of the first n characters (case-sensitive)
strpos() Returns the position of the first occurrence of a string inside another string (case-sensitive)
strrchr() Finds the last occurrence of a string inside another string
strrev() Reverses a string
strripos() Finds the position of the last occurrence of a string inside another string (case-insensitive)
strrpos() Finds the position of the last occurrence of a string inside another string (case-sensitive)
strstr() Finds the first occurrence of a string inside another string (case-sensitive)
strtolower() Converts a string to lowercase letters
strtoupper() Converts a string to uppercase letters
trim() Removes whitespace or other characters from both sides of a string
ucfirst() Converts the first character of a string to uppercase
vprintf() Outputs a formatted string
vfprintf() Writes a formatted string to a specified output stream
vsprintf() Writes a formatted string to a variable
wordwrap() Wraps a string to a given number of characters
Previous Home Next