Re: [PHP] Skip first 4 array values

2006-06-09 Thread Richard Lynch
> 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? http://php.net/array_slice -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscri

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Martin Alterisio
2006/6/9, Jonas Rosling <[EMAIL PROTECTED]>: 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

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Robert Cummings
On Fri, 2006-06-09 at 10:28, Brad Bonkoski wrote: > Eric Butera wrote: > > > On 6/9/06, Brad Bonkoski <[EMAIL PROTECTED]> wrote: > > > >> if numerically indexed: > >> $max = count($array); > >> for($i=0; $i<$max;$i++) { > >> if( $i <= 3 ) > >>continue; > >> else { > >>//do

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Brad Bonkoski
Eric Butera wrote: On 6/9/06, Brad Bonkoski <[EMAIL PROTECTED]> wrote: if numerically indexed: $max = count($array); for($i=0; $i<$max;$i++) { if( $i <= 3 ) continue; else { //do what you will } } Why not start $i at 3 and skip the if else? you could, just a sim

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Eric Butera
On 6/9/06, Brad Bonkoski <[EMAIL PROTECTED]> wrote: if numerically indexed: $max = count($array); for($i=0; $i<$max;$i++) { if( $i <= 3 ) continue; else { //do what you will } } Why not start $i at 3 and skip the if else? -- PHP General Mailing List (http://www.php.ne

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Rabin Vincent
On 6/9/06, Jonas Rosling <[EMAIL PROTECTED]> 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? php.net/array_slice if you want to cut them off. Rabin -- PHP General Mailing List (http://www.php.net/) To unsub

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Brad Bonkoski
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

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Dave Goodchild
On 09/06/06, Jonas Rosling <[EMAIL PROTECTED]> 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 Skip $array[0], $array[1], $array[2], $array[3] if you are talking about integer-indexed arrays.

RE: [PHP] Skip first 4 array values

2006-06-09 Thread Jef Sullivan
Why? Jef -Original Message- From: Jonas Rosling [mailto:[EMAIL PROTECTED] Sent: Friday, June 09, 2006 7:48 AM To: PHP List Subject: [PHP] Skip first 4 array values Is there any way you can skip for example the first 4 array values/posisions in an array no matter how many values it

[PHP] Skip first 4 array values

2006-06-09 Thread Jonas Rosling
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