InspiredPrynce
3 months ago

Array Keys Sorting

Posted 3 months ago by InspiredPrynce

I have this array

array:33 [▼
  0 => array:1 [▼
    1496373898 => array:2 [▼
      0 => array:1 [▼
        "first_term" => array:12 [▶]
      ]
      1 => array:1 [▼
        "second_term" => array:12 [▶]
      ]
    ]
  ]
  1 => array:1 [▼
    1496272323 => array:2 [▼
      0 => array:1 [▼
        "first_term" => array:12 [▶]
      ]
      1 => array:1 [▼
        "second_term" => array:12 [▶]
      ]
    ]
  ]
  2 => array:1 [▶]
  3 => array:1 [▶]
  4 => array:1 [▶]

but this is exactly what i want it to look like, please how do i get it:

array:33 [▼
    1496373898 => array:2 [▼
		"first_term" => array:12 [▶]
		"second_term" => array:12 [▶]
    ]
    1496272323 => array:2 [▼
        "first_term" => array:12 [▶]
        "second_term" => array:12 [▶]
    ]
]

Please sign in or create an account to participate in this conversation.