title: get previous array values in foreach
body: <p>My array : </p>
  
  <pre><code>$arr = array("jan","feb","mar","apr","mei","jun","jul","agu","sep","okt","nov","des");
  </code></pre>
  
  <p>then i do a foreach</p>
  
  <pre><code>foreach($arr as $ar){
    echo $ar;
  }
  </code></pre>
  
  <p>that will output jan to des</p>
  
  <p>my question is how do i display the previous values in current key?</p>
  
  <p>For example, when I get to feb, I want to display jan too, when I get to jul, i want to display jun, etc.</p>