PHP chr() Function4 Sept 2024 | 1 min read The PHP chr() 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:
Example 1Output: Your character is :52 By using 'chr()' function your value is: 4 Example 2Output: Your character is :42 By using 'chr()' function your value is: * Example 3Output: Your character is :0x52 By using 'chr()' function your value is: R Example 4Output: 2 + 2 = 4 Given above program in which the ASCII value of chr(43) is '+' and chr(61) is '=' converted . Next TopicPHP String |
PHP string Function PHP string function predefined functions. It is used to output a formatted string. We can pass the arg1, arg2, arg++ parameters at percent (%) signs in the main string. Syntax: printf(format,arg1,arg2,arg++); Parameter Description Required/Optional format Specify the string. Following are the possible format values: %% - Returns a percent sign %b...
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 in-built PHP function. It is used to format a number with grouped thousands. It supports one, two or three parameters (not three). Syntax: number_format(number,decimals,decimalpoint,separator) Parameter Description Required/Optional number The number being formatted. Required decimal Set the number of decimal point. Optional decimalpoint Sets the separator for the decimal point. Optional separator Set the thousand separator Optional Example...
1 min read
PHP Function PHP function is used to write a formatted string to a stream. In another words we can say that this function format string to a specified output stream( file or database). Syntax: fprintf(stream,format,arg1,arg2,arg++) Parameter Description Required/Optional stream Specify string where to write /output the string Required Format Specify the string. Required arg1 Specify the argument to...
2 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 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 The is predefine function of PHP. It is used to find the position of the first occurrence of a string inside another string. Note: This function is case-insensitive and binary safe. Syntax: stripos(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. Example...
1 min read
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 Hebrev() Function PHP is string function, which is used to convert Hebrew text from right to left or left to right visual text. Syntax: hebrev(string,maxcharline) ; Parameter Description Required/Optional string A Hebrew text. required maxcharline Specify maximum character for each line. optional Example 1 <?php echo hebrev("? ???? ?????"); ?> Output: ??????? ?????? ??? TopicPHP String ...
1 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
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