Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $length = 1;
- for($i = 0; $i < count($list); $i++) {
- foreach($list[$i]['prices'] as $key => $value) {
- sort($list[$i]['prices'][$key]);
- if(count($list[$i]['prices'][$key]) > $length) {
- array_splice($list[$i]['prices'][$key], $length);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement