You can access your array keys like so:
foreach ($array as $key => $value)
More Related Contents:
- php multidimensional array get values
- Rename key in each row of a 2d array
- Can't echo items from array
- PHP Multidimensional associative array to HTML table
- count how many duplicate keys are in array of objects?
- PHP – File to Associative Array with 1 key and two values attached
- How to access and manipulate multi-dimensional array by key names / path?
- How can I loop through two arrays at once? [duplicate]
- How to combine two arrays together?
- Replace keys in an array based on another lookup/mapping array
- Strange behavior of foreach when using reference: foreach ($a as &$v) { … }
- Echo a multidimensional array in PHP
- PHP Add element to every sub array of multi dimension array
- PHP foreach with Nested Array?
- Compare multidimensional arrays in PHP
- Sorting multidim array: prioritize if column contains substring, then order by a second column
- Flatten multidimensional array concatenating keys [duplicate]
- php array find duplicates, sum them up & delete duplicates
- PHP get both array value and array key
- PHP: Get the key from an array in a foreach loop [duplicate]
- PHP foreach loop through multidimensional array [duplicate]
- Count “truthy” values in a 2d array
- Merge two 2d arrays by shared column value
- Recursively sort keys of a multidimensional array
- Group 2d array data by one column and sum other columns in each group (separately)
- how to sort a multidemensional array by an inner key
- foreach with three variables add
- PHP convert nested array to single array while concatenating keys?
- Group array data on one column and sum data from another column to form a flat associative array
- Convert delimited string into array key path and assign value