You could make use of array_search()
Searches the array for a given value and returns the corresponding key if successful
<?php
$arr=array('a','b','c','d','e','f','g','h','i','j');
$key = array_search('a',$arr);
echo isset($arr[$key-1])?$arr[$key-1]:'NULL';
echo isset($arr[$key+1])?$arr[$key+1]:'NULL';