php – Custom fields array to display it monthly

Question

I have an array structure from custom fields inside custom post type like the following:


Array
(
    [webw_employee_projects] => Array
        (
            [January] => 0
            [February] => 0
            [March] => 0
            [April] => 0
            [May] => 0
            [June] => 0
            [July] => 0
            [August] => 0
            [September] => 0
            [October] => 0
            [November] => 0
            [December] => 0
        )

    [webw_employee_current_projects] => Array
        (
            [January] => 20
            [February] => 50
            [March] => 20
            [April] => 0
            [May] => 0
            [June] => 0
            [July] => 0
            [August] => 0
            [September] => 0
            [October] => 0
            [November] => 0
            [December] => 0
        )

    [webw_employee_min_target] => Array
        (
            [January] => 0
            [February] => 0
            [March] => 0
            [April] => 0
            [May] => 0
            [June] => 0
            [July] => 0
            [August] => 0
            [September] => 0
            [October] => 0
            [November] => 0
            [December] => 0
        )

    [webw_employee_max_target] => Array
        (
            [January] => 0
            [February] => 0
            [March] => 0
            [April] => 0
            [May] => 0
            [June] => 0
            [July] => 0
            [August] => 0
            [September] => 0
            [October] => 0
            [November] => 0
            [December] => 0
        )

    [webw_employee_target] => Array
        (
            [January] => 0
            [February] => 0
            [March] => 0
            [April] => 0
            [May] => 0
            [June] => 0
            [July] => 0
            [August] => 0
            [September] => 0
            [October] => 0
            [November] => 0
            [December] => 0
        )

    [webw_employee_target_bonus] => Array
        (
            [January] => 0
            [February] => 0
            [March] => 0
            [April] => 0
            [May] => 0
            [June] => 0
            [July] => 0
            [August] => 0
            [September] => 0
            [October] => 0
            [November] => 0
            [December] => 0
        )

    [webw_employee_max_hours] => Array
        (
            [January] => 0
            [February] => 0
            [March] => 0
            [April] => 0
            [May] => 0
            [June] => 0
            [July] => 0
            [August] => 0
            [September] => 0
            [October] => 0
            [November] => 0
            [December] => 0
        )

    [webw_employee_vacation_hours] => Array
        (
            [January] => 0
            [February] => 0
            [March] => 0
            [April] => 0
            [May] => 0
            [June] => 0
            [July] => 0
            [August] => 0
            [September] => 0
            [October] => 0
            [November] => 0
            [December] => 0
        )

    [webw_employee_hours] => Array
        (
            [January] => 0
            [February] => 0
            [March] => 0
            [April] => 0
            [May] => 0
            [June] => 0
            [July] => 0
            [August] => 0
            [September] => 0
            [October] => 0
            [November] => 0
            [December] => 0
        )

    [webw_employee_hours_bonus] => Array
        (
            [January] => 0
            [February] => 0
            [March] => 0
            [April] => 0
            [May] => 0
            [June] => 0
            [July] => 0
            [August] => 0
            [September] => 0
            [October] => 0
            [November] => 0
            [December] => 0
        )

    [webw_employee_karma_points] => Array
        (
            [January] => 0
            [February] => 0
            [March] => 0
            [April] => 0
            [May] => 0
            [June] => 0
            [July] => 0
            [August] => 0
            [September] => 0
            [October] => 0
            [November] => 0
            [December] => 0
        )

    [webw_employee_extra_payment] => Array
        (
            [January] => 0
            [February] => 0
            [March] => 0
            [April] => 0
            [May] => 0
            [June] => 0
            [July] => 0
            [August] => 0
            [September] => 0
            [October] => 0
            [November] => 0
            [December] => 0
        )

    [webw_employee_salary] => Array
        (
            [January] => 0
            [February] => 0
            [March] => 0
            [April] => 0
            [May] => 0
            [June] => 0
            [July] => 0
            [August] => 0
            [September] => 0
            [October] => 0
            [November] => 0
            [December] => 0
        )

)

The goal here to create tables for every user like this to be displayed every month as evaluation for him, so there’d be a table for every month in the user page, how this can be sorted given the array structure above?

January
[table of january data]

February
[table of February data]

March
[table of March data]

etc.. until December.

Thanks again.

0
Walled Mahmoud Soliman 4 months 2022-01-22T17:36:02-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse