Cleaner method of doing IF Basically, I'm performing an if statement on an array based on the returned value

&lt;?php
if($array[1]&gt;10000 AND $array[1]&lt;50000){
        $selling = $array[1] - 250;
    }
    elseif($array[1]&gt;50000 AND $array[1]&lt;100000){
        $selling = $array[1] - 500;
    }
    else{
        $selling = $array[1] - 100;
    }
    $buying = $array[1] - 1000;

    if($array[1]&gt;=10000){
        $buying = $buying-1000;
        if($array[1]&gt;=20000){
            $buying = $buying-1000;
            if($array[1]&gt;=30000){
                $buying = $buying-1000;
            }
                if($array[1]&gt;=40000){
                    $buying = $buying-1000;
                }
                    if($array[1]&gt;=50000){
                        $buying = $buying-750;
                    }
                        if($array[1]&gt;=60000){
                            $buying = $buying-500;
                        }
                            if($array[1]&gt;=70000){
                                $buying = $buying-500;
                            }
        }   
    }
?&gt;


As you can see it's VERY messy, would anyone be able to point me in the correct direction for cleaning this up please?
I seem to get the feeling you are either not comfortable using maps as others have suggested here...so why not throw in a switch instead?

$volume = $array[1];

if($volume &gt; 10000 &amp;&amp; $volume &lt; 50000){
    $selling = $volume - 250;
} else if($volume &gt; 50000 &amp;&amp; $volume &lt; 100000){
    $selling = $volume - 500;
} else {
    $selling = $volume - 100;
}

$buying = $volume - 1000;

switch($volume){
    case 10000:
    case 20000:
    case 30000:
    case 40000:
        $buying = $buying - 1000; break;
    case 50000:
        $buying = $buying - 750; break;
    case 60000:
    case 70000:
        $buying = $buying - 500; break;
    default:
        $buying = $buying;
}


REVISIT 01/26/2015: Revisiting this to say that I would now rewrite this code as follows:

function bound_check($bounds, $bound_check, $default_value) {
    $return_data = NULL;
    foreach($bounds as $bound){
        if($bound_check &gt;= $bound[0] &amp;&amp; $bound_check &lt;= $bound[1]){
            $return_data = $bound_check - $bound[2];
        }
    }
    return $return_data ?: $default_value;
}

$selling_bounds = [
    [10000, 50000, 250],
    [50000, 100000, 500],
];

$buying_bounds = [
    [10000, 40000, 1000],
    [50000, 50000, 750],
    [60000, 70000, 500]
]

$selling = bound_check($selling_bounds, $array[1], $volume - 100);
$buying = bound_check($selling_bounds, $array[1], $volume - 1000);