I am implementing a function to calculate date. the function makes the calculations to find each element: year, month, week, day, hour, minute, second.
the result of the calculation is an array like this:
array (
[year] => 0
[month] => 0
[week] => 0
[day] => 0
[hour] => 3
[minute] => 193
[second] => 11583
)
must now remove any occurrence that is KEY = 0, and leave only the indices hour, minute, second.
there's some native PHP function that can do this?
Thank you all