top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What is the use of explode() function in PHP ?

0 votes
28 views
What is the use of explode() function in PHP ?
posted Dec 26, 2017 by Jdk

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

The explode() function breaks a string into an array.It Returns an array of strings, each of which is a substring of string formed by splitting it on boundaries formed by the string delimiter.
Example:

$values  = "val1 val2 val3";
$splitValues = explode(" ", $values);
echo $splitValues[0]; // val1
echo $splitValues[1]; // val2
echo $splitValues[3]; // val3
answer Dec 26, 2017 by Madhavi Latha
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...