UNPKG

phpjs

Version:

php.js offers community built php functions in javascript

9 lines (8 loc) 340 B
function split(delimiter, string) { // From: http://phpjs.org/functions // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // - depends on: explode // * example 1: split(' ', 'Kevin van Zonneveld'); // * returns 1: {0: 'Kevin', 1: 'van', 2: 'Zonneveld'} return this.explode(delimiter, string); }