<?php

function sampling($days, $size, $combinations = array()) {

    # if it's the first iteration, the first set 
    # of combinations is the same as the set of characters
    if (empty($combinations)) {
        $combinations = array_map(function($day) { return array($day); }, $days);
    }

    # we're done if we're at size 1
    if ($size == 1) {
        return $combinations;
    }

    # initialise array to put new values in
    $new_combinations = array();

    # loop through existing combinations and character set to create strings
    foreach ($combinations as $combination) {
        foreach ($days as $day) {
            if (!in_array($day, $combination)) {
                $new_combination = $combination;
                $new_combination[] = $day;
                $new_combinations[] = $new_combination;
            }
        }
    }

    # call same function again for the next iteration
    return sampling($days, $size - 1, $new_combinations);
}

$days = array('Monday', 'Tuesday', 'Thursday');

print_r(sampling($days, 2));
print_r(sampling($days, 3));