title: Why is this select2 element selected by default?
body: <p>For some reason, this select2 element on my page is always selected. Here is the most minimal version:</p>
  <pre><code>    $(document).ready(function () {
          $('#animals').select2({
              'multiple': true,
          });
  
          $('#business_types').select2({
              'multiple': true,
          });
      });
  
  </code></pre>
  <pre><code>        &lt;div class=&quot;mt-2&quot;&gt;
              {{ \Form::tLabel('', __('Animals'))}}
              &lt;select name=&quot;animals[]&quot; id=&quot;animals&quot;&gt;
                  @foreach($animals as $animal)
                      &lt;option @if(in_array($animal-&gt;id, request()-&gt;animals ?? [])) selected @endif value=&quot;{{ $animal-&gt;id }}&quot;&gt;{{ $animal-&gt;name }}&lt;/option&gt;
                  @endforeach
              &lt;/select&gt;
          &lt;/div&gt;
          &lt;div class=&quot;mt-2&quot;&gt;
              {{ \Form::tLabel('', __('Business types'))}}
              &lt;select name=&quot;business_types[]&quot; id=&quot;business_types&quot;&gt;
                  @foreach($business_types as $business_type)
                      &lt;option @if(in_array($business_type-&gt;id, request()-&gt;business_types ?? [])) selected @endif value=&quot;{{ $business_type-&gt;id }}&quot;&gt;{{ $business_type-&gt;name }}&lt;/option&gt;
                  @endforeach
              &lt;/select&gt;
          &lt;/div&gt;
  
  </code></pre>
  <p>This PHP produces this:</p>
  <pre><code>&lt;select name=&quot;business_types&quot; id=&quot;business_types&quot; data-select2-id=&quot;select2-data-business_types&quot; multiple=&quot;&quot; tabindex=&quot;-1&quot; class=&quot;select2-hidden-accessible&quot; aria-hidden=&quot;true&quot;&gt;
  &lt;option value=&quot;1&quot; data-select2-id=&quot;select2-data-5-kfne&quot;&gt;Alimentation&lt;/option&gt;
  &lt;option value=&quot;2&quot;&gt;Animaleries&lt;/option&gt;
  ...
  &lt;/select&gt;
  </code></pre>
  <p>I didn't include the animal select, but it's the same issue: the first element is selected.</p>
  <p>I tried removing the PHP and it doesn't help much...</p>
  <p>Anyone has an idea on how to fix this?</p>