PHP explode()

Back to php.

thibault    (2009-04-09)


PHP explode()

array explode (string $delimiter , string $string [, int $limit])

The explode() function returns an array of strings, all of these strings are a substring of string located after and before the delimiter in string.

In example :


$string = 'This is an example.';

$string_exploded = explode(' ',$string);

print $string_exploded[0]; // Outputs 'This'
print $string_exploded[1]; // Outputs 'is'
print $string_exploded[2]; // Outputs 'an'
print $string_exploded[3]; // Outputs 'example.'


If the limit parameter is a positive integer, the array returned as a result will contain at most $limit elements. Note that the last element will contain the rest of string.

(more options below)

*ugh    (2009-06-16 12:40:02)
just a test

testing 123 anybody home

*9c4773    (2010-03-04 04:46:12)
13 years ago


for($i=1; $i<=5; ++$i)


echo $ma;


*pepebo    (2010-06-14 11:20:31)
12 years ago

great example thx, its really cool this programming language

*govuze    (2010-07-02 14:18:11)
12 years ago

you give fantastic example, thanks

*xilixo    (2010-07-28 17:43:23)
12 years ago

$str = "Hello world. It's a beautiful day.";
print_r (explode(" ",$str));

*rudemo    (2010-10-22 13:15:05)
PHP explode()


$string = 'This is an example.';

$string_exploded = explode(' ',$string);

print $string_exploded[0]; // Outputs 'This'
print $string_exploded[1]; // Outputs 'is'
print $string_exploded[2]; // Outputs 'an'
print $string_exploded[3]; // Outputs 'example.'


*bupaji    (2010-12-03 08:01:56)
12 years ago

it greate to understand very useful to understand

*jecoto    (2011-04-18 11:05:52)
11 years ago


$string = 'This is an example.';

$string_exploded = explode(' ',$string);

print $string_exploded[0]; // Outputs 'This'
print $string_exploded[1]; // Outputs 'is'
print $string_exploded[2]; // Outputs 'an'
print $string_exploded[3]; // Outputs 'example.'


*gicuba    (2011-07-22 12:54:10)
11 years ago

pawan sharma alok dixit rahul shingh

*dupane    (2012-02-09 12:47:01)
11 years ago

hello how are you, iam fine

*fexadu    (2012-03-08 11:08:02)
PHP explode()

PHP String Reference Complete PHP String Reference. Definition and Usage. The explode() function breaks a string into an array.

*mexeli    (2012-05-31 06:06:59)
10 years ago

hii my name is kunal

*gijero    (2012-08-20 13:41:33)
10 years ago

heloooooooooo world who is up for chat

*ginofe    (2012-08-29 14:08:11)
10 years ago

<p>ABB ( is a global leader in power and automation technologies. Our solutions improve performance and minimize environmental impact for energy companies and industries. The ABB Group of companies operates in around 100 countries and employs about 145,000 people.</p><br><p>You will be part of Metallurgy in Västerås. We are a business unit within the division Process Automation. Metallurgy is the market leader within specialized products for the metal industry worldwide. Our electromagnetic products offer several benefits during our customers’ steel and metal processes and thus increase productivity and quality in a number of areas. </p><br><p>Would you like to work within a technically advanced field under rapid development? At Metallurgy you will have the opportunity to develop new electromagnetic products and participate during the entire process, from the tender phase to delivery of complete products. With a great variation of tasks, this position offers inspiring challenges both for the recently graduated electrical designer as well as for the more experienced one. In this role, you will primarily design electrical systems and plants to steel mills and foundries, but also work with programming of control and drive systems as well as product development. You will be solely responsible for the electrical design in a project team consisting of four to five people with different competences. Our lead times are rather short and we work with several projects simultaneously. This requires that you enjoy a multifaceted role with frequent customer and supplier contacts. The position involves a few business trips annually, especially since you will act as sales support during the tender process and participate in commissioning at our global customers’ sites. Upon your request, you could also be offered to participate in additional assignments overseas. </p><br><p>You probably have a Bachelor in Electrical Engineering or equivalent skills combined with work experience. However, most important is you desire to evolve and find new solutions. It is advantageous if you have worked with plant design and PLC-programming as well as in software such as Engineering Base, Matlab, AC 800 or Siemens S7. You should be used to working in MS Office. As you will interact with international customers you need, in addition to Swedish, to be fluent in written and spoken English. On a personal level, you are responsible and responsive, adaptable and open to new ideas. You enjoy working in projects and value sharing ideas with members of the team and the department.</p><br><p>Per Larsson, Recruiting Manager, will answer your questions about the position on +4621-34 09 32 or via per.g.larsson(at) Union representatives - Sveriges Ingenjörer: Peter Rybing, +4621-34 09 38, Unionen: Hans Eriksson, +4621-34 22 06. All other questions can be directed to Recruitment Consultant Monika Källbäck, +4621-470 29 13. We look forward to receiving your application. </p><br>

See also

More websites

You must register to see these links, as this is a collaborative page, then you may change the order of the links by clicking the icons before the titles.

Other websites

The following links might be less relevant, please change their ranks if you find them useful.

 PHP Tutorial - explode
  1. would look like this after explode got done with
  2. takes is the delimiter (our dynamite) which is used to blow up the - A Beginner's Guide to Using * in PHP

Is it possible to split on the TAB character? Suppose I have: $data...
A domain just for this! Do this for all PHP functions and you are...

 php explode -
codingforums > showthread.

$userSelections will then be an array holding your...

 JavaScript Equivalent of PHP Explode Function
developertutorials > tutorials/javascript/javascript - PHP - explode
phpdig > ref/rn58re1163

The POSIX-compatible and Perl-compatible regular...
and is designed to provide information about the PHP programming...

 php explode function - PHP
daniweb > forums/thread109247

where can I get the source code of search, find, and view using...
No one has posted to this discussion for at least three...

 Everything PHP: Explode and Split |
blog.bluefur > 2009/04/22

: Vancouver - Calgary - Edmonton - Regina - Winnipeg - Toronto -...

 php - explode « php help

 Javascript equivalent for PHP's explode
kevin.vanzonneveld > techblog/article/javascript equivalent for

 PHP Explode()
webmaster source > 2009/01/11

Explode() is a widely-used PHP string function that is also one that...

 PHP Explode- How To Use The PHP Explode Function |
jwrmedia > lessons

 Delphi * function like * at Jason White
jasonwhite > index.

 Php Explode Function Help - Open Discussion
trap17 > forums

 Top 5 Best Uses of PHP Explode Function

Adobe Dreamweaver CS4 Recertification Examination: 9A0-091 Exam...
Using Web Design Software To Make Money With Your...

 WikiAnswers - How does PHP explode work
wiki.answers > Q/How does

When did people begin to think that aliens were...
What can people do to stop the effects of climate...
How do you display information in HTML while entering the query in PP...

 problem with php explode... - Ubuntu Forums
ubuntuforums > showthread.

 php explode question [Archive] - Dynamic Drive Forums
dynamicdrive > forums/archive/index.

I'm not sure of all the technicalities, but this should fix your...
I kind of understand what the code is trying to...

 [PHP] [php] explode that :) ! - PHP Development
justskins > forums

Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211...

 equivalent to PHP explode or PERL split - Dev Shed
forums.devshed > c programming 42/equivalent to

Safari Books Online provides searchable, on-demand access to...
Warburton's the largest independently owned bakery in the UK faced a...

 How does * work? 10 points for best answer!? - Yahoo! Answers > question/index?qid=20090118134045AAScMTT

Can someone explain to me the following codes in...
...akes in an input string, a delimiter string, and an optional limit...

 php explode function - PHP - Web Development > forum replies archive.cfm/747744

 Python equivil equivalent to PHP's * function - SitePoint Forums
sitepoint > forums/showthread.

Notice: This Website takes advantage of web standards that your...

 String manipulation ( * like function) - bytes
bytes > groups/net c/244256 string manipulation

 PHP - Explode | PHP Magic Book | Free PHP Scripts, Tutorials and Downloads

 Invision Power Services
forums.invisionpower > index.

 Online JavaScript Tutorials: JavaScript Equivalent of PHP Explode Function
online javascript tutorials.blogspot > 2007/11/javascript equivalent of

 php explode - By Antonie Potgieter
my.opera > Contrid/blog/show.dml/376602

 Tutorial: PHP - * |
robmonroe > blog/2008/09/tutorial

  * - 用法|在线手册|属性|方法

 php explode function : php
experts exchange > Web Development/Web Languages Standards

  * [Archive] -
emutalk > archive/index.

 Good-Tutorials - PHP: Top 5 Best Uses of PHP Explode Function
good tutorials > tutorials/33863/ top 5 best uses of

 Hyve Up Code: PHP: explode and implode
code.hyveup > 2009/03

 PHP: * vs. split() | Brian Hartsock's Blog
blog.brianhartsock > 2007/06/11

@RoboticCheese chrome is process per tab though, so if you are a...
@NeilDavidson recently switched from BB to iPhone and could never go...

 Top 5 Best Uses of PHP Explode Function - PHP tutorial
tutorialhero > tutorial 54911 top 5 best uses of

URL Variables in PHP - What are they, and how are they...
This article describes the why and how of real-life data encryption,...
...You honestly thought php explode function is only used to...


Guest name   (option)     Register
Please sum : 6118 + three  

Trackbacks : If you talked about this article in your blog or website, you may instantly get a backlink 
There's no trackback at the moment.