PHP htmlentities() Function4 Sept 2024 | 1 min read PHP htmlentities() function is string function, which is used to convert character to HTML entities. Syntax:
Example 1Output: Example 2Output: Hello PHP : 'E=MC�' Hello PHP : 'E=MC�' Hello PHP : 'E= Next TopicPHP String |
PHP Function The function is predefine string function of PHP. It is used to search a string for any of the specified characters or search a string for any of a set of character. Note: This function is case-sensitive. Syntax: strpbrk(string,charlist); Parameter Description Required/Optional string Specify the string...
1 min read
PHP Function PHP function is important string function. It is used to display one or more strings. In another words we can say that the function outputs one or more string. Note: The function is a little faster than print(). Syntax: void echo ( string...
1 min read
PHP string Function PHP string is predefined function. It is used to replace some character with some other characters. It is case-insensitive version of str_replace(). Note: This function is binary-safe. Syntax: str_ireplace(find,replace,string,count); Parameter Description Required/Optional find Specify the value to find. Required replace Specify the value to replace. Required string Specify the string to be searched Required Count It is variable that...
1 min read
String Function The is the in-built function of PHP. This function returns the translation table which is used by htmlspecialchars() and htmlentities() functions. There are several ways to encode the special characters. E.g. ", ", or &#34. Syntax get_html_translation_table(table, flags, encoding) For example get_html_translation_table( [ int $table = HTML_SPECIALCHARS...
2 min read
PHP Function The is predefined function of PHP. It is used to find the length of initial segment or returns the number of characters including whitespaces found in a string. Note: This function is binary-safe. Syntax: strcspn(string,char,start,length); Parameter Description Required/Optional String Specify the string to search. Required Char Specifies the characters to search for. Required Start Specify where...
1 min read
PHP Function PHP is string function. It is used to convert HTML entities to characters. The string function is the opposite of htmlentities(). Syntax: html_entity_decode(string,flags,character-set) Parameter Description Required/Optional string Specify the string to decode required flags Specify how to handle quotes and which document type to use. Optional Example 1 <?php $str = '<a href="https://www.javatpoint.com/">JavaTpoint.com</a>'; echo html_entity_decode($str); ?> Output: JavaTpoint.com Example 2 <?php print_r...
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 join() Function PHP string join() is predefined function. It is used to return a string from the elements of an array. It is an alias of the implode() function. Syntax: join(separator,array) Parameter Description Required/Optional separator Specify the array element optional array The array to join to a string required Example 1 <?php $arr = array('Hello','PHP','Join','Function'); echo join(" ",$arr)."<br>"; ?> Output: Hello PHP Join...
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 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
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