array is associative laravel code example
Example: check array is associative laravel
// true
$isAssoc = Arr::isAssoc([
'associative' => 'array'
]);
// false
$isAssoc = Arr::isAssoc([
0 => 'A',
1 => 'B',
2 => 'C'
]);
// true
$isAssoc = Arr::isAssoc([
'associative' => 'array'
]);
// false
$isAssoc = Arr::isAssoc([
0 => 'A',
1 => 'B',
2 => 'C'
]);