title: The array count returns wrong answer in php
body: <p>This is my php code:</p>
  
  <pre><code>$allids_arr = $_REQUEST['allids'];
  print_r($allids_arr);
  echo $arr_count = count($allids_arr);
  </code></pre>
  
  <p>The array printed like this:</p>
  
  <pre><code>Array (
       [0] =&gt; 26 
       [1] =&gt; 27 
       [2] =&gt; 28 
       [3] =&gt; 29 
       [4] =&gt; 30 
       [5] =&gt; 31 
       [6] =&gt; 32 
       [7] =&gt; 33 
  )
  </code></pre>
  
  <p>But the count display as <code>1</code>.</p>
  
  <p>But the correct answer is <code>8</code>.</p>
  
  <p>What is the problem in my code?</p>
  
  <p>EDIT:</p>
  
  <p>The array was i created:
  This is the code for my array creation:</p>
  
  <pre><code>$allids = array();
          $ikall = 0;
          foreach($alldata as $rwosall){
              $allids[$ikall] = $rwosall['journelmodel']['id'];
              $ikall++;
          }   
          $this-&gt;set('alldataids', $allids);
  </code></pre>
  
  <p>This is in my controller.And in my view page:</p>
  
  <pre><code>&lt;input type="hidden" readonly="" id="allids" class="input1" name="allids" value="&lt;?php print_r($alldataids);?&gt;"&gt;
  </code></pre>
  
  <p>This value was i requested when form submitted.</p>