title: Getting data from post array in CodeIgniter
body: <p>Ok, so I have a form that is sending me arrays in the POST array.  I am trying to read it like so:</p>
  
  <pre><code>$day = $this-&gt;input-&gt;post("days")[0];
  </code></pre>
  
  <p>This does not work.  PHP says "unexpected '['".  Why does this not work?</p>
  
  <p>I fixed it by doing it this way:</p>
  
  <pre><code>$days = $this-&gt;input-&gt;post("days");
  $day = $days[0];
  </code></pre>
  
  <p>I fixed my problem, I'm just curious as to why the 1st way didn't work.</p>