I wanna create an array or a function n php with something like this:
for index between 1-20 returns "type 1"
for index between 20-25 returns "type 2"
for index between 25-35 returns "type 1"
for index between 35-40 returns "type 3"
for index between 40-60 retusn "type 2".
How can I do this?
For example id 1, id 22, id 50 can be type 1, but also id 2, id 23, id 51 are type 2.
I've tried this:
function getSkinType($id) {
$skins = array(
0,13,40,46,47,59,60,72,73,76,82,83,84,85,90,91,93,98,102,103,104,105,106,107,108,109,110,111,112, 113,114,115,116,120,121,123,124,125,126,127,128,141,147,150,163,164,165,166,169,170,173,174,175,177,181,185,186,187,189,191,193,194,192,195,203,204,216,219,221,223,228,233,240,258,259,263,269,270,271,272,290,292,293,294,295,296,297,298,299,3 => "premium",
2,7,9,11,14,15,16,17,19,20,21,22,18,23,24,25,28,29,30,32,33,34,35,36,41,43,44,45,48,51,52,57,58,63,64,66,67,69,88,92,95,96,97,100,101,122,131,133,138,139,140,142,143,148,154,155,156,167,171,172, 176,179,180,182,183, 184,188,190,201,202,206,214,215,222,224,225,226,227,234,238,247,248,249,250,251,252 => "normal",
1,12,27,31,37,50,56,78,79,129,134,135,136,137,152,153,157,158,159,160,161,162,196,200,212 => "default"
);
return $skins[$id];
}