How to create Price Range dynamically with PHP
How can I create Price Ranges from price array? Let's say I have this array which holds prices: Array ( [0] => 500 [1] => 500 [2] => 520 [3] => 540 [4] => 551 [5] => 599 [6] => 601 [7] => 601 [8] => 650 [9] => 681 [10] => 750 [11] => 750 [12] => 851 [13] => 871 [14] => 871 [15] => 900 [16] => 990 [17] => 999 [18] => 1101 [19] => 1130 [20] => 1149 [21] => 1151 [22] => 1278 [23] => 1300 [24] => 1460 ) Minimum value is = 500 and maximum value is 1460. I need to show users like this : [x] 500-750 (11) [x] 750-1000 (8) [x] 1000+ (7) the tricky part is if values are reached 1500 or there are more