title: Finding Array length incakephp
body: <p>In my cakePHP controller there is an action named <code>saveReport()</code> where <code>$attribute_ids</code> is an array holding all the selected attributes obtained from the Ajax post..</p>
  
  <pre><code>function saveReport()
  {
      echo $this-&gt;params['form']['formid'];
      echo $this-&gt;params['form']['reportTitle'];
      echo $this-&gt;params['form']['attr'];
      $attribute_ids=$this-&gt;params['form']['attr'];
      $comma_separated = explode(",", $attribute_ids);
  
      for($i=0;$i&lt;15;$i++)
      {
          echo $comma_separated[$i]; 
          echo "     ";
  
          $this-&gt;data['Report']['title']=$this-&gt;params['form']['reportTitle'];
          $this-&gt;data['Report']['form_id']=$this-&gt;params['form']['formid'];
          $this-&gt;data['Report']['attr_id']=$comma_separated[$i]; 
          $this-&gt;Report-&gt;saveAll($this-&gt;data);
      }
  }
  </code></pre>
  
  <p>how to identify <code>$comma_separated</code> 's length where <code>$comma_separated</code> is an array so that i can use that in the for loop now i have used as 15 by default...</p>