title: how do i unset multiple keys in php
body: <p>I am getting error while unset the data. Can anyone tell me how to do that. Here i have column array look like:-</p>
  
  <pre><code>enter code here
  Array
  (
  [0] =&gt; Id
  [1] =&gt; Name
  [2] =&gt; MainDeity
  [3] =&gt; Description
  [4] =&gt; MainImage
  [5] =&gt; Category
  [6] =&gt; Tehsil
  [7] =&gt; City
  [8] =&gt; District
  [9] =&gt; State
  [10] =&gt; Terrain
  </code></pre>
  
  <p>)
  I am using laravel framework i want to unset three columns Id,State,Terrain
  I have used this code but it shows me error:- <strong>Cannot unset string offsets</strong></p>
  
  <pre><code>enter code here
   $columns = Schema::getColumnListing('places');
      foreach ($columns as $key =&gt; $value) {
          if($value=="Id"){
              unset($value[$key]);
          }
          $columndata[] = $value;
      }
  
      echo "&lt;pre&gt;";print_r($columndata); die;
  </code></pre>