How do I sort a multidimensional array by one of the fields of the inner array in PHP?

It is just a one liner

array_multisort( array_column($yourArray, "price"), SORT_ASC, $yourArray );

You can find it here as well: http://php.net/manual/en/function.array-multisort.php

search for "array_column" on that manual page.

UPDATE of Dec 1, 2020:

As @Tyler V. mentioned in his comment this syntax may cause errors in newer PHP 7 versions around "only variables can be passed by reference." To avoid those you need to change the one liner to a two liner unfortunately:

$col = array_column( $yourArray, "price" );
array_multisort( $col, SORT_ASC, $yourArray );

You need to use usort, a function that sorts arrays via a user defined function. Something like:

function cmp($a, $b)
{
    if ($a["price"] == $b["price"]) {
        return 0;
    }
    return ($a["price"] < $b["price"]) ? -1 : 1;
}

usort($yourArray,"cmp")

You can use usort():

function sort($a, $b) {
    if ($a['price'] == $b['price']) return 0;
    return ($a['price'] > $b['price']) ? 1 : -1;
}

usort($array, 'sort');

Even better if you create a class like this to reuse the code:

class FieldSorter {
    public $field;

    function __construct($field) {
        $this->field = $field;
    }

    function cmp($a, $b) {
        if ($a[$this->field] == $b[$this->field]) return 0;
        return ($a[$this->field] > $b[$this->field]) ? 1 : -1;
    }
}

$sorter = new FieldSorter('price');    
usort($array, array($sorter, "cmp"));

This way, you can easily sort by other fields.

And although you said the the keys of the outer array don't have to be preserved you can easily achieve this by using uasort() instead of usort.