私は2つの配列を持っています:
Array
(
[field_bathrooms] => Bathrooms
[field_bedrooms] => Bedrooms
[field_king_beds] => King Beds
[field_kitchen] => Kitchen
[field_queen_beds] => Queen Beds
[field_sleeps_max] => Sleeps
[field_sofa_beds] => Sofa Beds
[field_sqft] => Square Footage
[field_twin_beds] => Twin Beds
)
Array
(
[0] => Bathrooms
[1] => Square Footage
[2] => King Beds
[3] => Sofa Beds
[4] => Sleeps
[5] => Twin Beds
[6] => Queen Beds
[7] => Kitchen
[8] => Bedrooms
)
1 番目の配列を 2 番目の配列のキーで並べ替えたいので、最終結果は次のような配列になります。
Array(
[field_bathrooms] => Bathrooms
[field_sqft] => Square Footage
[field_king_beds] => King Beds
[field_sofa_beds] => Sofa Beds
[field_sleeps_max] => Sleeps
[field_twin_beds] => Twin Beds
[field_queen_beds] => Queen Beds
[field_kitchen] => Kitchen
[field_bedrooms] => Bedrooms
)
私は PHP と MySQL に比較的慣れていないことを告白しなければなりません。うまくいけば、皆さんの誰かが私を軌道に戻すことができます。