PHP String sscanf() Function4 Sept 2024 | 2 min read The sscanf() is predefined PHP function. It is used to return parses input from a string according to a format. If we will pass two parameters in the function, the data will be returned as an array. Related Function:
Syntax:
Example 1Output: int(7) Example 2Output: int(18) int(6) Example 3Output: string(10) "javatpoint" Example 4Output: Array ( [0] => We [1] => are [2] => Learning [3] => PHP [4] => 7 ) Next TopicPHP String |
PHP string Function The function is predefined PHP string function. It is used to calculate the SHA-1 hash of a file. It uses he US secure Hash Algorithm 1 and calculate the ha1 hash US secure Hash Algorithm 1. The hash is a 40 character hexadecimal...
1 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 string Function PHP string is in-built function. It is used to parse the string into variables. Syntax: parse_str(string,array); Parameter Description Required/Optional String Specify the string to parse required Array Specify the name of an array to store the variables. optional Example 1 <?php parse_str("name=John&age=26",$yourArray); print_r($yourArray); ?> Output: Array ( [name] => John [age] => 26 ) Example 2 <?php parse_str("name=John&age=26"); echo "Your Name:".$name."<br>"; echo "Your Age:".$age; ?> Output: Your Name:John Your...
1 min read
PHP string Function The is predefine function of PHP. It is used to repeat a string a specified number times. It returns input repeated multiple times. Syntax: tr_repeat(string,repeat); Parameter Description Required/Optional String Specify the string to repeat. Required repeat Specify the number of times for repeated. required Example 1 <?php echo "Before using '' function: ('.',13)"; echo "<br>"; echo "After using...
1 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 PHP string function is predefined function. It is often used to remove whitespace from both sides of a string or other character from the left side of a string. Syntax: ltrim(string,charlist); Parameter Description Required/Optional String Specify the string to check. Required charlist Specify character to remove from the string. "\0" : NULL "\t" :...
1 min read
PHP String Function The string function is an in-built function of PHP. It is used to wrap a string to the given number of characters using a string break character. PHP 4.0.2 and above versions support this function. In simple words, it wraps a string...
3 min read
PHP string lcfirst() Function The lcfirst() is in-built PHP string function. It is used to convert the first character of a string to lowercase. In another words we can say that it make a string's first character lowercase. It returns the converted string. Following are the related functions. ucfirst()...
1 min read
PHP Function The function in inbuilt function of PHP. It is used to find the position of the last occurrence of a string. This function returns all characters from this position to the end of the string or FALSE if the character is not found. Note: The...
1 min read
PHP string Function PHP function is predefined function. It is used formats number as a currency string. It returns a formatted version of number. It wraps the C library function strfmon() and often used with the setlocale() function. Note: This function does not work on windows...
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