- foreach ($item->input->attributes() as $attribute => $value) {
- if ($attribute == 'value') {
- $options[] = (string) $value;
- }
+ $input_node = $item->find('css', 'input');
+ if ($input_node->hasAttribute('value')) {
+ $options[] = $input_node->getAttribute('value');