PHP explode Function

PHP explode is predefined function which is used to split a string. when dealing with many php project its very common to use explode function because it is much useful.

(explode is basically used to separate different values form a single string.)

Here are the examples by which we will learn how to explode a string.

exp.: $name =’PHP_learn’;

$explode_name = explode(‘_’,$name);

Now $explode_name become an array. so we have to get values as same like array.

$first_name = $explode_name[0];

it will output = PHP.

$last_name = $explode_name[1];

it will output = learn.

Vijay maurya

Vijay maurya is a web developer having several years experience and passionate about programming. Vijay worked in many project along with reputed companies. The main aim of blogging is to spread knowledge who need help in development and also to improve knowledge and skills.

One thought on “PHP explode Function

Leave a Reply

Your email address will not be published. Required fields are marked *