Array propagate
Complete the array with the keys as part of the value
Start file
$arr = [ 'one_option' => '', 'other' => '', 'created_at' => '', 'updated_at' => '' ]
End file
$arr = [ 'one_option' => $row['one_option'], 'other' => $row['other'], 'created_at' => $row['created_at'], 'updated_at' => $row['updated_at'] ]
View Diff
2,6c2,6 < 'one_option' => '', < 'other' => '', < 'created_at' => '', < 'updated_at' => '' < ] \ No newline at end of file --- > 'one_option' => $row['one_option'], > 'other' => $row['other'], > 'created_at' => $row['created_at'], > 'updated_at' => $row['updated_at'] > ]
Solutions
The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!
Check out these helpful resources to improve your Vim skills... Game on.
Unlock 118 remaining solutions by signing in and submitting your own entry
#119 leo / @leo93755786 - Score: 100 - 08/27/20 @ 12:33
7wwi$row[<Esc>bb2yw<Down>b<Left>p<Down><Right>p<Down>b<Left>p<Right>i[<Right><Right>]<Up><Left>]<Left><Left><Left>[<Up><Left>]<Left><Left><Left>[<Up><Right><Right><Right><Right><Right><Right><Right>]<Esc>bbbbbbyw4wwwb<Right>p3wyw6wb<Right>p3wyw5w<Right>p3wyw5w<Right>p:wq<CR>
0 comments