Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
$workers = [
['id' => 1, 'name' => 'John Doe'],
['id' => 3, 'name' => 'Jane Doe'],
['id' => 4, 'name' => 'Monica Trullo'],
['id' => 5, 'name' => 'Jonathan Bank'],
];
foreach ($workers as ['id' => $workerId, 'name' => $workerName]) {
// …
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment