Split a string by a delimiter

Online version of PHP function explode and split