Quantcast
Channel: Milap Patel » String Functions
Browsing all 5 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

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 Article



Image may be NSFW.
Clik here to view.

strip_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 Article

Image may be NSFW.
Clik here to view.

strlen() – 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 Article

Image may be NSFW.
Clik here to view.

strpos() – 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 Article

Image may be NSFW.
Clik here to view.

PHP 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

Browsing all 5 articles
Browse latest View live




Latest Images