Answers for "loop through elements of array php"

PHP
1

php array loop

foreach($array as $item) {
    echo $item['filename'];
    echo $item['filepath'];

    // to know what's in $item
    echo '<pre>'; var_dump($item);
}
Posted by: Guest on May-05-2020
0

php loop through array

foreach($array as $item=>$values){
     echo $values->filepath;
    }
Posted by: Guest on July-12-2020

Code answers related to "loop through elements of array php"

Browse Popular Code Answers by Language