PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
foreach( $data->design->colors as $key => $value ) {
print $key . "\n";
}
?>
/* Output */
Center Flap D
Reserve Handle
Panel 3
Pinstripe D-E
Center Flap B
Cutaway Handle
Center Flap E
Center Flap C
Panel 2
Party Pinstripe B
Party Stripe
Panel 1
Legpad (Out)
Pinstripe C-D
Panel 4
Harness
Backpad
Center Flap A
Pinstripe A-B
Ring Cover
Party Pinstripe A
Pinstripe B-C
Legpad (In)
Main Risers
Binding Tape
Panel 5
Correct, it is definitely a stdClass object, array syntax does not work. I will try your suggestion above, I am interested to see if it works.
It should not be valid to have spaces in variable or method names, but this is a weird situation created by decoding a JSON object that was encoded in actionscript