PHP String strtolower() function4 Sept 2024 | 2 min read The strtolower() is one of the most popular functions of PHP, which is widely used to convert the string into lowercase. It takes a string as a parameter and converts all uppercase English character of that string to lowercase. Other characters such as numbers and special character of that string remain the same. PHP 4+ versions support this function. Note: The strtolower () is a binary-safe function.There are some other functions in PHP which are similar to the strtolower() function: Related functions
SyntaxThe syntax for the strtolower() function is given below, which takes only one string parameter. Parameters$string (required): This is a mandatory parameter of this function which specifies a string to convert into lowercase. In simple words - it is a string which is converted into lowercase. Return ValueIt returns converted lowercase string. ExamplesThe strtolower() is a widely used function of PHP. Below some examples are given. With the help of these examples, we can understand the working of this function practically. Example 1 Output: all is well Example 2 Output: String before conversion: ALAYMA IS A CUTE AND SINCERE GIRL. String after conversion: alayma is a cute and sincere girl. Example 3 In this example, we will see that special characters remain the same after applying strtolower() function on the string. It only converts alphabet characters, whereas there is no change in special symbols. Output: String before conversion: !, @, %, $, And # Are The Special Symbols. String after conversion: !, @, %, $, and # are the special symbols. Next TopicPHP String Functions |
PHP function PHP function is predefined function. It is used to calculate the metaphone key of a string. It is useful to text search and text matching application. It is phonetic algorithm developed by Lawrence Philips. The algorithm produces variable length keys as output. Syntax: string metaphone (...
1 min read
PHP String function The function is an in-built function of PHP. It is a case-sensitive function which finds the first occurrence of a string. The is mainly used to search the first occurrence of a string inside another string and displays some part of...
3 min read
PHP string levenshtein() Function PHP string levenshtein() function is in-built function. It is used to calculate the distance between two strings. By default, PHP provides some operations (replace, insert and delete) It returns the Levenshtein distance between the two argument strings or -1, if the string exceeds 255...
1 min read
PHP String Function The is an in-built function of PHP, which is used to convert the first character of each word to uppercase in a string. The is supported by the PHP 4 and above versions. It takes a string as an input and...
2 min read
PHP String Function The function is in-built function of PHP. It is used to access the individual elements of the locale categories. This function allows us to select any element specifically. Unlike the localeconv() function which returns all the local formatting information, function returns...
3 min read
PHP Function PHP function is important string function, which is used to calculate the crc32( cyclic redundancy checksum ) polynomial of a string. It can be used to validate data integrity. Note : you are using function then, you must have to use %u formatter...
1 min read
function in PHP The is an in-built function of PHP which is used to search the first occurrence of the string inside another string, and it returns rest of the string if the string is present. It is a binary-safe function (Binary safe function means...
3 min read
PHP Function PHP function is predefined string PHP function , which is used to decode a uuencoded string. It returns the decoded data as a string. Syntax: string convert_uudecode ( string $data ); Parameter Description Required/Optional string The uuencoded string to decode Required Example 1 <?php $str ="*:F%V851P;VEN=``` ` "; // javatpoint echo "Your Decode string is...
1 min read
PHP String Function The is a built-in function of PHP. It counts the number of times a substring occurs in the given string. The is a case-sensitive function, which means it treats uppercase and lowercase alphabets differently. For example - A substring "cha" is not...
3 min read
PHP Function PHP function is used to add quote string with slashes in a C style. It is case-sensitive Syntax: string addcslashes ( string $str , string $charlist ) Parameter Description Required/Optional String String to be esxaped Required Character Character or range to be escaped. Required Example 1 <?php $str="Welcome to JavaTpoint"; echo "Your String : ".$str; echo "<br>"."By using ''...
1 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India