This function takes a string as its first parameter and as many integers as you want as the next one(s), and returns an array with the string exploded at the index(es) you specified

function explodex() {
    $args = func_get_args();
    if (!is_string($args[0])) return false;
    $array = array();
    $lastpos = 0;
    for ($i=1;$i<func_num_args();$i++) {
        if (!is_int($args[$i])) return false;
        $tmp = substr($args[0], $lastpos, $args[$i] - $lastpos);
        if ($tmp != '') $array[] = $tmp;
        $lastpos = $args[$i];
    }
    $tmp = substr($args[0], $lastpos);
    if ($tmp != '') $array[] = $tmp;
    return $array;
}