PHP MYSQL multidimensional array

前端 未结 2 502
挽巷
挽巷 2021-01-22 19:34

I\'m having major headaches trying to create a multidimensional array from two separate MySQL selects.... I\'ve been searching here and Google all day and have to finally admit

2条回答
  •  伪装坚强ぢ
    2021-01-22 20:17

    If you have an ID from the first Array, you can check for keys / values with this ID in the second Array.

    If you want to get the key you should use

    array_key_exists($string)
    

    And if you want to get the value you should use

    in_array($string)
    

    You can use a foreach loop to execute this functions!

提交回复
热议问题