search

Home  >  Q&A  >  body text

How to traverse multi-dimensional array in tp5.

There is an array.

Array( [ids] => Array ( [0] => 1 [1] => 2 [2] => 3) [num] => Array (          [0] = > 2                                                                         [2] =  

ids=1

num=2

)

Array(

ids=2

num=3

)

Array(

ids=3

num=1

)

SoGunSoGun1430 days ago1532

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2021-01-06 09:40:52

    You can use multiple loops or flatten the array. This is basic knowledge of PHP and has nothing to do with TP

    reply
    0
  • Cancelreply