- var_dump: documentation ( source)
- array_walk: documentation ( source)
<?php
$basket = [
'Items' => [
[
'd' => 'e',
'b' => 'c',
'a' => 'b'
],
[
'a' => 'b',
'd' => 'e',
'b' => 'c'
],
[
'd' => 'e',
'a' => 'b',
'b' => 'c'
]
],
];
if (isset($basket['items']) && is_array($basket['items'])) {
array_walk($basket['items'], 'ksort');
}
var_dump($basket);