title: How to remove the nth element from the end of an array
body: <p>I know you can use the "array_pop" to remove the last element in the array. But if I wanted to remove the last 2 or 3 what would I do?</p>
  
  <p>So how would I remove the last 2 elements in this array? </p>
  
  <pre><code>&lt;?php
  $stack = array("orange", "banana", "apple", "raspberry");
  $fruit = array_pop($stack);
  print_r($stack);
  ?&gt;
  </code></pre>