是否可以从数据库查询的数组中获取结果并按结果中的一列排序?如果是这样,那将如何进行?
这是我拥有的数组的示例:
Array ( [0] => stdClass Object ( [item] => 0 [size] => 2056515 [group] => SF2K [description] => 205/65R15 SAFFIRO SF2000 94V 40K [sort4] => 94 [sort5] = > V [sort6] => [price] => 69.14 ) [1] => stdClass Object ( [item] => 8518 [size] => 2056515 [group] => FTOUR [description] => 205/65R15 FUZION TOUR BW 94H 40K [sort4] => 94 [sort5] => H [sort6] => [price] => 77.63 ) [2] => stdClass Object ( [item] => 106633 [size] => 2056515 [group] => SEREN [描述] => 205/65R15 BS TURANZA SER+ 94H 80K [sort4] => 94 [sort5] => H [sort6] => [price] => 124.07 ) )
我想按 [价格] 对其进行排序。我知道在这个例子中它们都已经按数字顺序排列了,但它们并不总是如此。