Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// We import the support for this Helper
use Illuminate\Support\Arr;
// We use the method Arr::divide()
[$keys, $values] = Arr::divide(['name' => 'Shameem Reza', 'price' => '3.40']);
// We obtain the keys and values separately
$keys: ['name', 'price']
$values: ['Shameem Reza', '3.40']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment