Display an array in a readable/hierarchical format

后端 未结 18 1244
北荒
北荒 2020-12-02 04:53

Here is the code for pulling the data for my array



        
18条回答
  •  时光说笑
    2020-12-02 05:32

    print_r() is mostly for debugging. If you want to print it in that format, loop through the array, and print the elements out.

    foreach($data as $d){
      foreach($d as $v){
        echo $v."\n";
      }
    }
    

提交回复
热议问题