I have a php array and I am trying to var dump the values so I can see what is being returned but when I use a foreach loop, only one of the values is being dumped even though there are 2 values in the array. Can someone tell me what is incorrect in the code?
PHP
$items = ($items['things']);
foreach ($items as $value) {
var_dump($value); // Returns just the first thing in my items array i.e. "textbook"
}
If I var_dump($items) I get an array like this
array:2 [
0 => "textbook"
1 => "pencil"
]