<?php $a = [1, 2, 3, 4, 3, 2, 1]; $j = count($a) - 1; $output = []; for($i = 0; $i > count($a); $i++) { if ($a[i] !== $a[j]) { $output = $a[i]; } } print_r($output);
You have javascript disabled. You will not be able to edit any code.