title: Converting arrray values to integer from request in laravel
body: <p>I want to <code>array_diff()</code> two arrays in Laravel. The first array looks like this:</p>
  
  <pre><code>    array:4 [
    0 =&gt; 7248
    1 =&gt; 7249
    2 =&gt; 7250
    3 =&gt; 7251
  ]
  </code></pre>
  
  <p>the second one:</p>
  
  <pre><code>array:4 [
    0 =&gt; "7248"
    1 =&gt; "7249"
    2 =&gt; "7250"
    3 =&gt; "7251"
  ]
  </code></pre>
  
  <p>this one I get with <code>$request-&gt;request-&gt;get('ids', []);</code>.</p>
  
  <p><strong>How can I convert one array to either strings or integers?
  As these arrays can grow large, I don't really want to convert every single value one at a time.</strong> </p>
  
  <p><strong>Update:</strong></p>
  
  <p>array_diff() is doing it's job, altough there are strings vs. integers.</p>
  
  <p>Thanks in advance!</p>