Welcome Guest, Not a member yet? Register   Sign In
Function for exact range
#1

[eluser]Fantass[/eluser]
Hello, heres the trouble if i want a exact range for example 1-10 do specific function

this way
Code:
<?php

$input= 1; //

if ($input == 1):
echo 'OK';
elseif($input == 2):
echo 'OK';
elseif($input == 3):
echo 'OK';
elseif($input == 4):
echo 'OK';
elseif($input == 5):
echo 'OK';
elseif($input == 6):
echo 'OK';
elseif($input == 7):
echo 'OK';
elseif($input == 8):
echo 'OK';
elseif($input == 9):
echo 'OK';
elseif($input == 10):
echo 'OK';
endif;?>

But the real trouble is i had to do arround 2 thousand if's by this way, theres another way to do this specifing Example range 20-31 do this.. etc,? Thanks alot.


Messages In This Thread
Function for exact range - by El Forum - 02-23-2012, 10:37 PM
Function for exact range - by El Forum - 02-23-2012, 11:01 PM
Function for exact range - by El Forum - 02-23-2012, 11:04 PM
Function for exact range - by El Forum - 02-24-2012, 12:22 AM
Function for exact range - by El Forum - 02-24-2012, 01:15 AM
Function for exact range - by El Forum - 02-24-2012, 01:33 AM
Function for exact range - by El Forum - 02-24-2012, 10:21 AM
Function for exact range - by El Forum - 02-27-2012, 12:27 AM
Function for exact range - by El Forum - 02-27-2012, 12:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB