PHP strlen() Function4 Sept 2024 | 1 min read The strlen() function is predefined function of PHP. It is used to find the length of string or returns the length of a string including all the whitespaces and special character. Syntax:
Example 1Output: Your String is:Javatpoint By using 'strlen()' function:10 Example 2Output: Your String is:Java T point By using 'strlen()' function:12 Example 3Output: Your String is:P H P By using 'strlen()' function:11 Reference: http://php.net/manual/en/function.strlen.php See Also:
Next TopicPHP String |
PHP Function PHP function is used to convert string value of ASSCII characters to hexadecimal value. Syntax: string bin2hex ( string $str ) Parameter Description Required/Optional string The string to be converted Required Example 1 <?php $str ="Hello World!"; echo "Your ASCII character is: ".$str; echo "<br>"."By using '' Method your hexadecimal value is: ".bin2hex($str); ?> Output: Your ASCII...
1 min read
PHP Function The is predefine string function of PHP. It is used to find the position of the last occurrence of a string inside another string. Syntax: Strripos(string,find,start); Parameter Description Required/Optional String Specify the string to search. Required Find Specify he string to find. Required Start Specify where to begin the search. Optional The function returns the position of...
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 string function is predefined function of PHP. It is the alias of strstr() function or can used to search for the first occurrence of a given string. Note: This function is case sensitive and binary-safe. Syntax: strchr(string,search,before_search); Parameter Description Required/Optional String Specify the string to search. Required Search Specify the string to...
1 min read
PHP String Function The function is a built-in function of PHP which is used to convert an 8-bit string to a quoted-printable string. This function is opposite to the quoted_printable_decode(), and similar to the imap_8bit() function. It returns a quoted printable string that is created...
1 min read
PHP String function The is an in-built function of PHP which is used to find the position of the last occurrence of a substring inside another string. It is a case-sensitive function of PHP, which means it treats uppercase and lowercase characters differently. The is...
4 min read
PHP string Function PHP string is predefined function.It is used to calculate the SHA-1 hash of a string. It uses US secure Hash Algorithm 1. SHA-1 produces a 160-bit output called a message digest. Note: To calculate the SHA-1 hash of a file, use the sha1_file()function. Syntax: sha1(string,raw); Parameter Description Required/Optional String Specify...
1 min read
PHP Function The PHP function is used to generate a single byte string from a number. In another words we can say that it returns a character from specified ASCII value. Syntax: string chr ( int $bytevalue ); Parameter Description Required/Optional ascii An ASCII value Required Example 1 <?php $char =52; echo "Your character is :".$char; echo...
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 used to return a quote string with slashes. It works with some characters: Single quote (') Double quote(") Blackslash(|) NUL (the NUL byte) Syntax: string addslashes ( string $str ); Parameter Description Required/Optional string String to be escaped Required Example 1 <?php $str = 'What does "WHO" mean?'; echo "Your string is :".$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