title: In PHP, how can I tell what values are adjacent to a specific value in an array?
body: <p>I have an array of values.  Let's say the array is like this:</p>
  
  <pre><code>[apple, banana, coconut, duku, emblica, fig, gooseberry]
  </code></pre>
  
  <p>Let's say that I know a specific value, "fig."  How can I know which values are next to it, both before and after?</p>