title: How cast or convert array value string to boolean in php
body: <p>I'm Working with Laravel <code>ACL</code>.In every Role have group of permissions. I represent the all permissions using checkbox. When I submit form it's return a permissions array like this.</p>
  
  <pre><code>{
  read: "true",
  create: "true",
  delete: "false",
  update: "false"
  }
  </code></pre>
  
  <p>array value show as <code>double quotes</code> string ,but i want it as <code>boolean</code> 
  How can i cast array values string to boolean.</p>
  
  <pre><code>@foreach($role-&gt;permissions as $key=&gt;$value)
  
             &lt;td&gt;
             &lt;input type="hidden" name="permission[{{$key}}]" class="role" value="false" {{ $value==0 ? 'checked' : '' }}&gt;
             &lt;input type="checkbox" name="permission[{{$key}}]" class="role" value="true" {{ $value==1 ? 'checked' : '' }}&gt;
              &lt;/td&gt;
  @endforeach
  </code></pre>
  
  <p>I want to array value like this.</p>
  
  <pre><code>{
  read: true,
  create: true,
  delete: false,
  update: false
  }
  </code></pre>