Associative array iteration

0

How can I get the data from the array with an index?

Example:

$colors[$color["IdColor"]] = array(
            'IdColor' => $color["IdColor"],
            'Color' => $color["Color"]
        );

I tried using two foreach but it did not work, it did not give me anything back.

    
asked by Danz djsjd 20.12.2017 в 14:34
source

0 answers