Loop through an array php

前端 未结 5 881
故里飘歌
故里飘歌 2020-11-22 17:13

I have this array... how do you print each of the filepath and filename? What is the best way to do this?

  Array ( 
    [0] => Array ( 
             [fid         


        
5条回答
  •  误落风尘
    2020-11-22 17:49

    You can use also this without creating additional variables nor copying the data in the memory like foreach() does.

    while (false !== (list($item, $values) = each($array)))
    {
        ...
    }
    

提交回复
热议问题