Those of you who are familiar with PHP know a very useful function called explode() which takes a string and a delimiter and splits the string into an array using the delimiter as the splitter.
So for instance a string “this|is|a|test” can be split up into an array where:
 = this
 = is
 = a
 = test
var text = "this|is|a|test"; var split = text.split("|"); document.write(split + " " + split + " " + split + " " + split);
Note: The delimiter is removed from the string and represents the “space” between each item that will be in the array.