Code Sample: explode()

See manual.

explode() returns an array of strings. Each array element is a substring of the main string. The substrings are the fragments resulting from the explosion along boundaries specified by a delimiter string.

/*
Break down the composite to get the phrases.
NOTE: explode also gives the empty string on the left of :::
We don't want that.
*/
$phrases = explode(":::", $composite_NO_SLASHES);

// get rid of first element
unset($phrases[0]);
Advertisements

About samehramzylabib

See About on https://samehramzylabib.wordpress.com
This entry was posted in PHP String and tagged , , . Bookmark the permalink.

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s