$a = array(1, 2, 3, 4);
foreach ($a as $b) {
echo $b.'</br>';
}
$a = array(1, 2, 3, 4);
echo $a[1].'</br>';
foreach ($a as $b) {
if($a[1] !== $b){ echo $b.'</br>'; }
}
$a = array(1, 3, 2, 4);
$key = array_search(2, $array);
echo $a[$key].'</br>';
foreach ($a as $b) {
if($a[$key] !== $b){ echo $b.'</br>'; }
}