<?php
$array = [
[
'tag' => 'meta',
'type' => 'complete',
'attributes' => ['property' => 'og:type', 'content' => 'website']
],
[
'tag' => 'meta',
'type' => 'complete',
'attributes' => ['name' => 'robots', 'content' => 'noindex, nofollow']
],
[
'tag' => 'meta',
'type' => 'complete',
'attributes' => ['name' => 'application', 'content' => 'My Application']
],
[
'tag' => 'meta',
'type' => 'complete',
'attributes' => ['http-equiv' => 'content-type', 'content' => 'text/html; charset=utf-8']
]
];
foreach ($array as ['attributes' => $attr]) {
foreach ($attr as $keys[] => $values[]) {
break;
}
}
array_multisort($keys, $values, $array);
var_export($array);
preferences:
27.7 ms | 405 KiB | 5 Q