Reorder A Numerically Keyed Array Using Array Splice?
So today I was given an interesting task by a client. I had the output of a certain function. That function returns an array containing the days of the week (via numeric key, 0 = Sunday, 1 = Monday, etc). The value of each key was an array containing data. Something like this:
1 2 3 4 5 6 |
[ 2 => [] 4 => [] 1 => [] ... ] |
Using shorthand array syntax here & […]
Read more
Recent Comments