There is an array of this type: 
I am trying to extract the values, but it does not work:
$i=0; foreach ($department as $drow){ d($drow[$i]['departmentID']); $i++; } In the $drow variable, you have an array with the key departmentID , and at each iteration the value in this array will be updated:
$department = [ ['departmentID' => 1], ['departmentID' => 2], ['departmentID' => 3], ['departmentID' => 4], ['departmentID' => 5] ]; foreach ($department as $drow){ echo $drow['departmentID'] . '<br>'; } Source: https://ru.stackoverflow.com/questions/881963/
All Articles