Answers for "how to get array from array in foreach in php"

PHP
1

php foreach string in array

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 assign an array inside a foreach loop

$data = array_fill_keys($input, 50);
Posted by: Guest on July-26-2021

Code answers related to "how to get array from array in foreach in php"

Browse Popular Code Answers by Language