title: 'htmlentities() expects parameter 1 to be string, array given' error on Laravel view
body: <p>I was testing the Request.php (submitting form with empty required fields) of my create view, and got the 'htmlentities() expects parameter 1 to be string, array given' error.</p>
  
  <p>I know the error was generated because of the code below. This is a part of my view (calls javascript functions) used to create future appointment reminders.</p>
  
  <p>I just don't see what is causing the error exactly.</p>
  
  <pre><code>&lt;div style="display:none"&gt;    
  &lt;div id="reminderiteminitial"&gt;      
  &lt;div class="row" style="padding: 0.5em 0 0.5em 0.5em"&gt;  
        &lt;div class="col-sm-2" &gt;
             {!! Form::text('reminder_time[]', 30, ['class' =&gt; 'form-control', 'placeholder' =&gt; '']) !!}
        &lt;/div&gt;
        &lt;div class="col-sm-2" &gt;
             {!! Form::select('reminder_timeunit[]', ['minute' =&gt; 'minutes(s)', 'hour' =&gt; 'hour(s)', 'day' =&gt; 'day(s)', 'week' =&gt; 'week(s)', 'month' =&gt; 'month(s)'], null, ['class' =&gt; 'form-control']) !!}
        &lt;/div&gt;
        &lt;div class="col-sm-2" &gt;
             {!! Form::select('delivery_method[]', ['eml' =&gt; 'Email'], null, ['class' =&gt; 'form-control']) !!}
        &lt;/div&gt;
        &lt;div class="col-sm-4" &gt;
             {!! Form::text('delivery_contact[]', null, ['class' =&gt; 'form-control', 'placeholder' =&gt; 'Your email address']) !!}
        &lt;/div&gt;
        &lt;div class="col-sm-2" &gt;
            &lt;input class="btn btn-default" type="button" value="Delete reminder" onClick="removeitem(this);"&gt;
        &lt;/div&gt;
  
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div id="reminderitem"&gt;     
  &lt;/div&gt;
  
  &lt;div class="row" style="padding: 1.5em 0 2.5em 0"&gt;      
  &lt;div class="col-sm-12"&gt;         
        &lt;input class="btn btn-default" type="button" value="Add a reminder" onClick="addreminderitem();"&gt;
  &lt;/div&gt;
  &lt;/div&gt;  
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>&lt;script language='javascript' type='text/javascript'&gt;
  
    var itemCount = 1;
    var limit     = 6;
  
    function addreminderitem(){
  
          if (itemCount == limit)  {
  
             alert("You have reached the maximum number of reminders.");
          }
          else  {
             var newreminderitem            = document.getElementById('reminderitem');
             var initialreminderitem_clone  = document.getElementById('reminderiteminitial').cloneNode(true);
  
             initialreminderitem_clone.id   = 'item_'+itemCount++;
  
             newreminderitem.appendChild(initialreminderitem_clone);
          }
    } 
  
    function removeitem(item){
          item.parentNode.parentNode.parentNode.remove(); 
  
          itemCount = itemCount - 1;
    }     
  
  &lt;/script&gt;
  </code></pre>
  
  <p>Whoops shows:</p>
  
  <pre><code>reminder_time   
  array:1 [
    0 =&gt; "30"
  ]
  
  reminder_timeunit 
  array:1 [
    0 =&gt; "minute"
  ]
  
  delivery_method 
  array:1 [
    0 =&gt; "eml"
  ]
  
  delivery_contact 
  array:1 [
    0 =&gt; ""
  ]
  </code></pre>
  
  <p><strong>Update #2</strong></p>
  
  <p>What's strange is that if I replace the following HTML forms code:</p>
  
  <pre><code>  &lt;div class="col-sm-2" &gt;
         {!! Form::text('reminder_time[]', 30, ['class' =&gt; 'form-control', 'placeholder' =&gt; '']) !!}
    &lt;/div&gt;
    &lt;div class="col-sm-2" &gt;
         {!! Form::select('reminder_timeunit[]', ['minute' =&gt; 'minutes(s)', 'hour' =&gt; 'hour(s)', 'day' =&gt; 'day(s)', 'week' =&gt; 'week(s)', 'month' =&gt; 'month(s)'], null, ['class' =&gt; 'form-control']) !!}
    &lt;/div&gt;
    &lt;div class="col-sm-2" &gt;
         {!! Form::select('delivery_method[]', ['eml' =&gt; 'Email'], null, ['class' =&gt; 'form-control']) !!}
    &lt;/div&gt;
    &lt;div class="col-sm-4" &gt;
         {!! Form::text('delivery_contact[]', null, ['class' =&gt; 'form-control', 'placeholder' =&gt; 'Your email address']) !!}
    &lt;/div&gt;
    &lt;div class="col-sm-2" &gt;
        &lt;input class="btn btn-default" type="button" value="Delete reminder" onClick="removeitem(this);"&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>with the html it generates:</p>
  
  <pre><code>&lt;div class="col-sm-2" &gt;
     &lt;input class="form-control" placeholder="" name="reminder_time[]" type="text" value="30"&gt;
  &lt;/div&gt;
  &lt;div class="col-sm-2" &gt;
     &lt;select class="form-control" name="reminder_timeunit[]"&gt;&lt;option value="minute"&gt;minutes(s)&lt;/option&gt;&lt;option value="hour"&gt;hour(s)&lt;/option&gt;&lt;option value="day"&gt;day(s)&lt;/option&gt;&lt;option value="week"&gt;week(s)&lt;/option&gt;&lt;option value="month"&gt;month(s)&lt;/option&gt;&lt;/select&gt;
  &lt;/div&gt;
  &lt;div class="col-sm-2" &gt;
     &lt;select class="form-control" name="delivery_method[]"&gt;&lt;option value="eml"&gt;Email&lt;/option&gt;&lt;/select&gt;
  &lt;/div&gt;
  &lt;div class="col-sm-4" &gt;
     &lt;input class="form-control" placeholder="Your email address" name="delivery_contact[]" type="text"&gt;
  &lt;/div&gt;
  &lt;div class="col-sm-2" &gt;
    &lt;input class="btn btn-default" type="button" value="Delete reminder" onClick="removeitem(this);"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I don't get the error!?</p>