3
私はこの配列を並べ替える方法の例を各配列の依存キーに依存して表示できますか?私は配列が依存関係の順番になるようにしたいので、最初にクッキー、ブートストラップ、チェックボックス、管理者のjqueryを入れてください。私は他の投稿を見てきましたが、私には意味がありませんでした。これは完全な配列の小さな部分です。配列の順序と長さは任意です。配列の別の配列の値を並べ替える
誰でも私にこれを行うコードスニペットを表示できますか?
Array
(
[0] => Array
(
[name] => jquery
[version] => 1.1
[file] => vendor/jquery/jquery.js
)
[1] => Array
(
[name] => cookie
[version] => 1.0
[file] => vendor/cookie/cookie.js
[dependency] => Array
(
[0] => administration
[1] => jquery
)
)
[2] => Array
(
[name] => bootstrap
[version] => 1.0
[file] => vendor/bootstrap/js/bootstrap.js
[dependency] => Array
(
[0] => jquery
)
)
[3] => Array
(
[name] => checkbox
[version] => 1.0
[file] => vendor/checkbox/checkbox.js
[dependency] => Array
(
[0] => jquery
[1] => sticky
)
)
[4] => Array
(
[name] => datepicker
[version] => 1.0
[file] => vendor/datepicker/datepicker.js
[dependency] => Array
(
[0] => jquery
)
)
[5] => Array
(
[name] => nanobar
[version] => 1.0
[file] => vendor/nanobar/nanobar.js
[dependency] => Array
(
[0] => jquery
)
)
[6] => Array
(
[name] => owlcarousel
[version] => 1.0
[file] => vendor/owlcarousel/owlcarousel.js
[dependency] => Array
(
[0] => jquery
)
)
[7] => Array
(
[name] => selectmultiple
[version] => 1.0
[file] => vendor/selectmultiple/selectmultiple.js
[dependency] => Array
(
[0] => jquery
)
)
[8] => Array
(
[name] => selectric
[version] => 1.0
[file] => vendor/selectric/selectric.js
[dependency] => Array
(
[0] => jquery
)
)
[9] => Array
(
[name] => sortable
[version] => 1.0
[file] => vendor/sortable/sortable.js
[dependency] => Array
(
[0] => jquery
)
)
[10] => Array
(
[name] => uisortableanimation
[version] => 1.0
[file] => vendor/uisortableanimation/uisortableanimation.js
[dependency] => Array
(
[0] => jquery
)
)
[11] => Array
(
[name] => summernote
[version] => 1.0
[file] => vendor/summernote/summernote.js
[dependency] => Array
(
[0] => jquery
)
)
[12] => Array
(
[name] => validation
[version] => 1.0
[file] => vendor/validation/validation.js
[dependency] => Array
(
[0] => jquery
)
)
[13] => Array
(
[name] => sticky
[version] => 1.0
[file] => vendor/sticky/sticky.js
[dependency] => Array
(
[0] => cookie
[1] => jquery
)
)
[14] => Array
(
[name] => jrate
[version] => 1.0
[file] => vendor/jrate/jrate.js
[dependency] => Array
(
[0] => jquery
)
)
[15] => Array
(
[name] => retina
[version] => 1.1
[file] => vendor/retina/retina1.js
[dependency] => Array
(
[0] => jquery
)
)
[16] => Array
(
[name] => confirmation
[version] => 1.0
[file] => vendor/confirmation/confirmation.js
[dependency] => Array
(
[0] => jquery
)
)
[17] => Array
(
[name] => bootstrapfilestyle
[version] => 1.0
[file] => vendor/bootstrapfilestyle/bootstrap-filestyle.js
[dependency] => Array
(
[0] => jquery
)
)
[18] => Array
(
[name] => minicolors
[version] => 1.0
[file] => vendor/minicolors/minicolors.js
[dependency] => Array
(
[0] => jquery
)
)
[19] => Array
(
[name] => administration
[version] => 1.0
[file] => javascript/index.js
[dependency] => Array
(
[0] => jquery
[1] => bootstrap
[2] => checkbox
[3] => datepicker
[4] => nanobar
[5] => owlcarousel
[6] => selectmultiple
[7] => selectric
[8] => sortable
[9] => uisortableanimation
[10] => summernote
[11] => validation
[12] => jrate
[13] => retina
[14] => confirmation
[15] => bootstrapfilestyle
[16] => minicolors
)
)
)
これを解決するための異なるアプローチの数はおそらくあり
これはより多くのコンテキストを必要とします。おそらくフィルタリングするサンプル配列。 JS配列を扱う効率的な方法もあります。 [js arrays](https://www.youtube.com/watch?v=Rx_JFOSxgpY) –
私はPHPを使用しています。最終結果は