11.07.2015 Views

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

www.it-ebooks.infoCHAPTER 9 • STRINGS AND REGULAR EXPRESSIONSElement = ColumbusElement = OhioExploding a String Based on a Predefined DelimiterThe explode() function divides the string str into an array of substrings. Its prototype follows:array explode(string separator, string str [, int limit])The original string is divided into distinct elements by separating it based on the character separatorspecified by separator. The number of elements can be limited with the optional inclusion of limit. Let’suse explode() in conjunction with sizeof() and strip_tags() to determine the total number of words ina given block of text:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!