Removing elements from array dynamically
<p>So I've learnt how to add elements to an array dynamically - how about removing them?</p>

<p><strong>jQuery</strong></p>

<pre><code>$(document).on('change blur', '.roomFac', function () {
        var park = $("#park2").val();
        var lecturestyle = $("#lecture_style2").val();
        var roomstructure = $("#room_structure2").val();
        var groupsize = $("#groupSize2").val();
        var facilities = "";
        $('select[name*=roomFac]').each(function () {
            facilities += $(this).val();
            facilities += ",";
        });
        var dataString = 'park=' + park + '&amp;' + 'lecturestyle=' + lecturestyle + '&amp;' +
            'roomstructure=' + roomstructure + '&amp;' + 'groupsize=' + groupsize + '&amp;' +
            'facilities=' + facilities;
        $.ajax({
            type: "POST",
            url: "process_timetableMon2.php",
            data: dataString,
            cache: false,
            success: function (html) {
                $('#mon').html(html);
            }
        });
    });
</code></pre>

<p><strong>process_timetableMon2.php</strong></p>

<pre><code>$array = explode(",", $_POST["facilities"]);

for($i = 0; $i &lt; count($array)-2; $i++){
    echo $array[$i].'&lt;br&gt;';
}
</code></pre>

<p>I've uploaded some code here: <a href="http://jsfiddle.net/kfm5b/3/" rel="nofollow">http://jsfiddle.net/kfm5b/3/</a></p>
