phiptubrift
New Member
I'm currently having some trouble trying to decouple this foreach array. It basically prints all checkboxes as a group (widget) in a form.\[code\]<?php foreach ($widgets as $id => $widget): ?> <label for="<?php print $widget->id; ?>"> <?php print $widget->label; ?> </label> <?php print $widget->id; ?>\[/code\]Doing print_r function on $widgets shows the ff: array: \[code\]Array([filter-tid] => stdClass Object ( [widget] => Option 1Option 2Option 3 [operator] => [label] => label here [id] => edit-id-here )[filter-tid_1] => stdClass Object ( [widget] => Option 1Option 2Option 3 [operator] => [label] => label here [id] => edit-id-here ) ....... and so on.... \[/code\]How would I go about printing each item in the foreach separately? Thanks.