0

Is it possible to get 33 value separated? Below, I add my result, I just wanted to get the 33 value (first array key value).

Array
(
    [33] => Array
        (
        [StudentClass] => Array
            (
                [18884] => Array
                    (
                        [count_total] => 5
                    )

                [29754] => Array
                    (
                        [count_total] => 2
                    )

                [446] => Array
                    (
                        [count_total] => 1
                    )

                [600] => Array
                    (
                        [count_total] => 1
                    )

            )
George Kagan
  • 5,913
  • 8
  • 46
  • 50
Kai McKenzie
  • 495
  • 1
  • 5
  • 18
  • 2
    array_keys($array)[0] – Timurib Nov 28 '16 at 15:13
  • @Timurib 's solution works with PHP >=5.3 – B001ᛦ Nov 28 '16 at 15:19
  • Latest supported version is 5.6. Btw, list($first) = array_keys($array); Also you may use a array_shift(), reset(), etc (but this functions takes a reference, so you need a temporary variable if you don't want to produce E_NOTICE). More info: http://stackoverflow.com/q/1921421/1220930 – Timurib Nov 28 '16 at 18:47

0 Answers0