Results 1 to 4 of 4
Oct 6, 2012, 14:54 #1
- Join Date
- Apr 2003
- daejeon, South Korea
- 1 Post(s)
- 0 Thread(s)
Finding the 2nd smallest value in an ArrayCode:
min(array(48, 9, 52, 183));
Now I like to find the 2nd smallest value which is 48 in the Array.
I guess I have 2 ways.
The 1st way is that finding the 2nd smallest value directly if there is any code or function in PHP.
The other way is that creates a new Array with the removing or deleting the smallest value which is 9 in the Array.
The new Array will be newArray[48, 52, 183) and the code below will find my target value 48.
min(array(48, 52, 183));
How can I get remove an array value which is 9 for finding the second smallest value(the other way)?
How can I get my target result?