PHP string rtrim() Function4 Sept 2024 | 1 min read PHP rtrim() is predefined function which is used to remove whitespace or character form the right side of a string. Syntax:
Example 1Output: Without rtrim() function: Hello PHP! With rtrim() function:Hello PHP! Example 2Output: Without trim() function: Hello PHP! With trim() function: Hello PHP! Next TopicPHP String |
PHP String Function PHP string is predefine function which is used to insert HTML line break before all newlines in a string. It returns string with <br \> or <br> before all newlines (\r\n, \n\r, \n and \r). Syntax: nl2br(string,xhtml); Parameter Description Required/Optional String Specify input string required xhtml Boolean value, whether to use XHTML...
1 min read
PHP String function The function is an in-built function of PHP. This function is used to find the length of the initial segment of a string placed inside another string. In simple words - the function helps us to find "how many number of...
3 min read
PHP String Function The function is used to convert the first character of the string into the uppercase. It is an in-built function of PHP, which takes a string as input and converts only the first letter of that string to uppercase. This function converts...
2 min read
PHP soundex() function PHP soundex() function is used to calculate the soundex key of a string. Its key has property and can be used to search in database where pronunciation is known but not the spelling. Soundex function is described by Donald Knuth. Syntax: soundex(string); Parameter Description Required/Optional String Specify the string to check Required. Example 1 <?php $str...
1 min read
PHP Function The is predefine function of PHP. It is used to remove backslashes and clean up data retrieved from a database or from an HTML form. It returns a string with backslashes stripped off. This function is important while we need to remove the...
1 min read
PHP string function PHP string is predefine function. It is used to compare two given string. It is binary safe and case-insensitive. It is similar to the strncasecmp() function. It returns: If the two strings are equal: [ 0 ] If string1 is less than string2: [<...
1 min read
PHP String Function The function is the in-built function of PHP. It is used to get numeric information. This function returns an array which contains local numeric and monetary formatting information. This function is a non-parameterized function, so we do not need to pass anything...
5 min read
PHP Function PHP function is important function, which is used to output one or more string. Note: The function is not actually a function, so there is no required to use parentheses. Syntax: int print ( string $arg ); Parameter Description Required/Optional string Specify one or more string to be sent output. Required Example...
1 min read
PHP implode() is a string function, which joins the array elements in a string. It is a binary-safe function. In implode() function, parameters can be passed in any order. The implode() function works same as the join() function and returns a string created from the elements...
2 min read
PHP explode() is a string function, which splits a string by a string. In simple words, we can say that it breaks a string into an array. The explode() function has a "separator" parameter, which cannot contain an empty string, because it holds the original...
3 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