php - Create a price range from given min and max values -


given 2 values $min , $max, want create price range users choose from.

example

$min = 849; $max = 41259; 

my thresholds are:

<10k 10k 25k 25k 40k 40k+ 

so, if min value 12000, first 1 in threshold not come. tried couple of things, none worked. highly appreciated.

one solution use loop in php.

$min = 123; $max = 345; for($i=$min;$i<$max;$i++){     echo $i."<br/>"; } 

change $min minimum , $max maximum.

update:

if want first , last i.e. min , max values should not displayed itself. use code

$min = 123+1; $max = 345-1; for($i=$min;$i<$max;$i++){     echo $i."<br/>"; } 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -