php explode – A php function which splits a string int to an array
The explode() function breaks a string into an array. Syntax:- explode(separator,string,limit); Example1 :- <?php $my_string = “part1 part2 part3 part4 part5 part6″; $my_array = explode(” “,...
View Articlestrip_tags – PHP remove custom tags
strip_tags() function is used to remove HTML and PHP tags from a string. HTML comments and PHP tags are also removed. It returns the stripped string. <?php $My_string = ’<p>This is example of...
View Articlestrlen() – Finding length of a PHP string
PHP strings can be of any length, since there is no limits to the size of strings in PHP. The PHP strings can be specified using either single quote (ex. ‘This is my test string’) or using double...
View Articlestrpos() – Find position of first occurrence of a string
strpos() function returns the numeric position of the first occurrence of a string. Example :- <?php $string = ‘This is an example of string postion’; echo strpos($string,’e'); ?> Output :- 11...
View ArticlePHP htmlentities() – convert characters to html entities
PHP htmlentities function is used for covert the characters to its HTML entities. This function will automatically identify the characters which have an equivalent HTML entity , and then convert to it....
View Article