# responsive-menu/3.0.6/src/app/Form/Select.php

Responsive Menu – Create Mobile-Friendly Menu, version 3.0.6. 25 lines.

- Page: https://pluginprobe.com/plugins/responsive-menu/3.0.6/code/src/app/Form/Select.php
- Raw: https://pluginprobe.com/plugins/responsive-menu/3.0.6/raw/src/app/Form/Select.php
- Modified: 2016-06-21T17:18:08+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/responsive-menu/3.0.6/code/src/app/Form/Select.php#L10-L20`.

```php
<?php

namespace ResponsiveMenu\Form;
use ResponsiveMenu\Models\Option as Option;
use ResponsiveMenu\Form\FormComponent as FormComponent;

class Select
{

	public function render(Option $option, array $select_data)
	{

    $html = "<div class='select-style'><select class='select' name='menu[{$option->getName()}]' id='{$option->getName()}'>";
    foreach($select_data as $data) :
      $selected = $option->getValue() == $data['value'] ? 'selected="selected"' : '';
      $disabled = isset($data['disabled']) ? 'disabled="disabled"' : '';
      $pro = isset($data['disabled']) ? ' [PRO]' : '';
      $html .= "<option value='{$data['value']}' {$selected} {$disabled}>{$data['display']}{$pro}</option>";
    endforeach;
    $html .= "</select></div>";
    echo $html;
	}

}

```
