function missingCharacter($list) {
// Create an array with a range from array minimum to maximu
$newArray = range(min($list), max($list));
// Find those elements that are present in the $newArray but not in given $list
return array_diff($newArray, $list);
}
print_r(missCharacter(array('a','b','d','g')));