I have a list of an array something like this
[0] => Array
(
[id] => 104
[book_id] => 32
[price] => 55
)
[1] => Array
(
[id] => 117
[book_id] => 76
[price] => 65
)
[2] => Array
(
[id] => 135
[book_id] => 77
[price] => 65
)
[3] => Array
(
[id] => 100
[book_id] => 78
[price] => 65
)
[4] => Array
(
[id] => 110
[book_id] => 21
[price] => 85
)
[5] => Array
(
[id] => 107
[book_id] => 35
[price] => 90
)
[6] => Array
(
[id] => 108
[book_id] => 64
[price] => 90
)
[7] => Array
(
[id] => 130
[book_id] => 101
[price] => 100
)
If you see the array, it arranged by price from lowest to largest. I'm trying to re-arrange the array to get only 3 lowest prices and filter out the rest. Means that, when I do the filtration, my array must contain the prices from 55-85 which is from index 0-4.
Is there a way I can filter it like that? Thank you.