PHP Echo a number using else if and greater than or less than
问题 I have a script which is like a whois database. This function returns site views and I want to echo between value. How can I echo and return one result? If the number is say 4000, it should return only 1k-10k Rows are like 1550330 1000000 The code: $siteTotalViews=1000000; if($siteTotalViews <= 100){ echo '0-100'; } if($siteTotalViews <= 1000){ echo '100-1k'; } if($siteTotalViews <= 10000){ echo '1k-10k'; } if($siteTotalViews <= 100000){ echo '10k-100k'; } if($siteTotalViews <= 1000000){ echo