Output array number?

Array
(
    [xxx] => Array
        (
            [birthdate] => 1983-05-21 00:00:00
            [sex] => 1
        )

    [xxx] => Array
        (
            [birthdate] => 1985-05-10 00:00:00
            [sex] => 1
        )

    [xxx] => Array
        (
            [birthdate] => 1983-02-19 00:00:00
            [sex] => 1
        )

)

How do I output xxx which is always a different number?

You can iterate over an array with foreach and thereby output the key like

foreach($myArray as $key => $value) {
  echo $key;
}

Thanks buddy so much works great.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.