Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (13 sloc) 275 Bytes
<?php
#bad
$labels = ['a','b','c','d'];
$index = 0;
foreach($labels as $label){
$labels[$index] = Carbon::format('Y-m-s',$label);
$index++;
}
#good
$labels = ['a','b','c','d'];
foreach($labels as $index => $label){
$labels[$index] = Carbon::format('Y-m-s',$label);
}
You can’t perform that action at this time.