Answers for "how to display array in php using for loop"

PHP
1

php array loop

for ($i = 0; $i < count($array); $i++) {
    echo $array[$i]['filename'];
    echo $array[$i]['filepath'];
}
Posted by: Guest on May-05-2020
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

Code answers related to "how to display array in php using for loop"

Browse Popular Code Answers by Language