I have an array created in PHP as follows:
$arr = array(123,144,144,123);
How do I get the first and last indexes of occurrence of each value.
Something like,
123 -> first occurrence - 0th index | last occurrence - 3rd index
144 -> first occurrence - 1st index | last occurrence - 2nd index
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…