Okay I know this is going to be a tough one, so I'll warn you now!
I want to achieve this:
[B]By Price[/B]
up to £449
£450 - £1,339
£1,340 - £3,119
£3,120 - £6,689
£6,690 or more
I could hard code this, but the prblem is that I want it to do the following:
I will select a MIN and MAX price from the database as follows:
list($minprice, $maxprice) = mysql_fetch_row(mysql_query("SELECT MIN(price) AS lowest_price, MAX(price) AS highest_price FROM product_table "));
(Don't wory about syntax errors - thanks, but that's not important right now)
So I have 2 variables, $minprice & $maxprice.
I want SIX equal increments, the $minprice COULD be 0.00 and the last price option NEEDS to be less than the $maxprice because I need to be able to say "£5,599 or more".
So logically if I have a prices available between £399 and £6,999 the following would be my result:
[B]By Price[/B]
up to £449
£450 - £1,339
£1,340 - £3,119
£3,120 - £6,689
£6,650 or more
£0.00 to £329, this:
[B]By Price[/B]
£0 - £50
£100 - £150
£150 - £200
£200 - £250
£300 or more
And, £0.00 to £49, this:
[B]By Price[/B]
£0 - £10
£10 - £25
£25 - £40
£40 or more
And, £0.00 to £0.49, this:
[B]By Price[/B]
£0 - £0.10
£0.10 - £0.25
£0.25 - £0.40
£0.40 or more
So as you can see, a maximum of 6 increments, but if you can't fit them in then It may be appropriate to reduce them to 4 (for example).
Anyone done anything like this before?
Thanks in advance :-)