Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
arr::divide()
// 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
You can’t perform that action at this time.