title: String to array conversion in php
body: <p>I got the string from the ajax and passed the string in url as 
  1,2,3,4,5,6</p>
  
  <p>After using explode function,
  i.e. <code>$explode_id = explode(',', $request-&gt;data);</code>
  I got the output as
  ["1","2","3","4","5","6"]</p>
  
  <p>But I want the data as:
  [1,2,3,4,5,6]</p>
  
  <p>How do I get it?
  And it should not be like ["1,2,3,4,5,6"]
  Because I want to compare the data in:</p>
  
  <pre><code>  $product_id = Product::where('name', 'like','%'.$main.'%')-&gt;where('id', $explode_id)-&gt;pluck('id');
  </code></pre>
  
  <p>I got the answer here.
  Am passing the id that i want to match in URL like</p>
  
  <pre><code>$("input[type='checkbox']").click(function() {
    if ($(this).is(':checked')) {
     var days = $(this).val();
     $.ajax({
          type: "get",
          url: '/getcreatedat',
          data: { 'days': days },
          success: successFunc,
              error: errorFunc
          });
          function successFunc(data, status) {
            var pageURL = $(location).attr("href");
            window.location.href = pageURL+ '/' +data;
          }   
          function errorFunc(xhr, error) {
               console.log(error);
          }
      }
  });
  </code></pre>
  
  <p>The next time I click the function:
  url passing the id's double the time</p>