PHP string strchr() Function4 Sept 2024 | 1 min read The string strchr() 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:
Example 1Output: PHP Example 2Output: point! Example 3Output: Hello References: http://php.net/manual/en/function.strchr.phpNext TopicPHP String |
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
PHP string Function PHP string_tags() is predefine string function of PHP. It is used to strip HTML and PHP tags from a string or strips a string from HTML, XML and PHP tags. Note 1: This function is binary safe. It return a string with all NULL...
1 min read
PHP function PHP is most important string function. It is used to return information about characters in a string. Syntax: count_chars(string,mode); Parameter Description Required/Optional string The string to be checked Required mode Specify the return modes Optional Note: Depending on mode '' function returns one of the following: 0 : It is an array with the byte-value as key...
2 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 Function PHP function is predefined string function, which is used to encodes a string using the uuencode algorithm. It returns the uuencoded data. Note: By using "Uuencoded function" the uuencoded data is 35% larger than the original. Syntax: convert_uuencode(string) Parameter Description Required/Optional String The string to uuencode Required Example 1 <?php // encode the string $str2...
1 min read
PHP String Function The function is an in-built function of PHP, which converts pre-defined HTML entities to characters. It is opposite to the htmlspecialchars() function. HTML entities decoded back to the character will be like- &amp; converts as & (ampersand) &quot; converts as " (double-quote) &#039; converts as...
3 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. &quot;, &#x22;, 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 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 Function The function is used to remove whitespace or other predefined character from the right end of a string. Syntax: chop(string,charlist); Note: function is different than the Perl function function, which is used to remove the last character in the string. Parameter Description Required/Optional string the string to be check Required charlist charlist...
1 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
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