<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-563109968537479291</id><updated>2011-11-27T16:49:12.805-08:00</updated><title type='text'>php explode - A php function which splits a string int to an array</title><subtitle type='html'>PHP explode : A php function explode - One of the powerful function of PHP which splits a string into an array with the help of repeatable delimiter. Complete details of a PHP function which returns an array from string.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://phpexplode.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/563109968537479291/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://phpexplode.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>phpexplode</name><uri>http://www.blogger.com/profile/11300380337948767012</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-563109968537479291.post-7485105291007455156</id><published>2008-12-21T08:22:00.000-08:00</published><updated>2008-12-21T09:04:21.091-08:00</updated><title type='text'>php explode convert string in to array</title><content type='html'>&lt;h1&gt;php explode&lt;/h1&gt;&lt;br /&gt;&lt;b&gt;How to convert a string in to array in php?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;PHP has lots of built in string functions. PHP also has a string function which easily &lt;u&gt;split a string into an array&lt;/u&gt; with the help of repeatable delimiter. The function name is &lt;b&gt;explode&lt;/b&gt;, with 3 parameters to it.&lt;br /&gt;&lt;br /&gt;Syntax of &lt;b&gt;explode&lt;/b&gt;.&lt;br /&gt;&lt;u&gt;array explode( string $delimiter,string $string,[int $limit]);&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;function description &lt;/u&gt;&lt;a href="http://phpexplode.blogspot.com/2008/12/php-explode-convert-string-in-to-array.html" title="php explode"&gt;explode&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;explode&lt;/i&gt; simply returns an array of strings, where each element of an array is nothing but a substring of string provided in variable $string. String is split on the basis of $delimiter.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;parameter description&lt;/u&gt;&lt;br /&gt;1. string $delimiter&lt;br /&gt;$delimiter can be a character or no of characters which occurs repeatedly in $string. It is nothing but a boundary for all substrings. &lt;br /&gt;&lt;br /&gt;2.string $string&lt;br /&gt;This is nothing but any string that is to be converted in array with the help of above delimiter.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Point to note.&lt;/u&gt;&lt;br /&gt;1.What if delimiter is empty.&lt;br /&gt;-&gt;If delimiter string is empty e.g. "" then &lt;b&gt;explode()&lt;/b&gt; will simply return FALSE.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Example snippet.&lt;/u&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;$string    = 'php||explode||returns||array';&lt;br /&gt;$delimiter = '||'&lt;br /&gt;print_r(explode($delimiter,$string));&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;output of above snippet.&lt;/u&gt;&lt;br /&gt;Array&lt;br /&gt;(&lt;br /&gt;    [0] =&gt; php&lt;br /&gt;    [1] =&gt; explode&lt;br /&gt;    [2] =&gt; returns&lt;br /&gt;    [3] =&gt; array&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Converse function of explode&lt;/u&gt;&lt;br /&gt;implode()  :  post coming soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/563109968537479291-7485105291007455156?l=phpexplode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpexplode.blogspot.com/feeds/7485105291007455156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpexplode.blogspot.com/2008/12/php-explode-convert-string-in-to-array.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/563109968537479291/posts/default/7485105291007455156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/563109968537479291/posts/default/7485105291007455156'/><link rel='alternate' type='text/html' href='http://phpexplode.blogspot.com/2008/12/php-explode-convert-string-in-to-array.html' title='php explode convert string in to array'/><author><name>phpexplode</name><uri>http://www.blogger.com/profile/11300380337948767012</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
