Re: Skip first 4 array values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



if numerically indexed:
$max = count($array);
for($i=0; $i<$max;$i++) {
   if( $i <= 3 )
      continue;
   else {
      //do what you will
   }
}

for associative...
$count = 0;
foreach($arr as $k => $v ) {
   if($count <= 3 )
      conitnue;
   else {
      //do stuff
   }
   $count++;
}

-Brad

Jonas Rosling wrote:

Is there any way you can skip for example the first 4 array values/posisions
in an array no matter how many values it contains?

Thanks // Jonas


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux