Decrementing alphabetical values
<p>I'm trying to figure out how to shift a bunch of letter values in an array down one step. For example, my array contains values ("d", "e", "f", "g", "h") and I want to change this to ("c", "d", "e", "f", "g"). Here's the code I'm working with:</p>

<pre><code>function move_up_left($x) {
    if($x['orientation'] == "down") {
        foreach($x[0] as &amp;$value) {
            $value = --$value; 
        }
    } else {
        foreach($x[1] as &amp;$value) {
            $value = --$value;
        }
    }

    return $x;
}
</code></pre>

<p>When I use positive values, the letters change; however the negative numbers do not seem to be working at all.</p>
