Answer the question
In order to leave comments, you need to log in
How to sort multidimensional php array by string values?
There is an array:
$product_option_value_data[] = array(
'name' => $option_value['name'],
'product_option_value_id' => $option_value['product_option_value_id'],
'option_value_id' => $option_value['option_value_id'],
'image' => $this->model_tool_image->resize($option_value['image'], 50, 50),
'price' => $price,
'price_prefix' => $option_value['price_prefix']
);
arsort($product_option_value_data);
Array
(
[0] => Array
(
[name] => 0,95 кг
[product_option_value_id] => 535415
[option_value_id] => 365
[image] =>
[price] => 479.00P
[price_prefix] => =
)
[2] => Array
(
[name] => 11,5 кг
[product_option_value_id] => 535416
[option_value_id] => 447
[image] =>
[price] => 4960.00P
[price_prefix] => =
)
[1] => Array
(
[name] => 3,2 кг
[product_option_value_id] => 535417
[option_value_id] => 520
[image] =>
[price] => 1500.00P
[price_prefix] => =
)
)
Array
(
[0] => Array
(
[name] => 0,95 кг
[product_option_value_id] => 535415
[option_value_id] => 365
[image] =>
[price] => 479.00P
[price_prefix] => =
)
[1] => Array
(
[name] => 3,2 кг
[product_option_value_id] => 535417
[option_value_id] => 520
[image] =>
[price] => 1500.00P
[price_prefix] => =
)
[2] => Array
(
[name] => 11,5 кг
[product_option_value_id] => 535416
[option_value_id] => 447
[image] =>
[price] => 4960.00P
[price_prefix] => =
)
)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question