Re: [PHP] Removing empty values from array

2009-06-25 Thread Ashley Sheridan
On Thu, 2009-06-25 at 17:18 -0400, Eddie Drapkin wrote: > On Thu, Jun 25, 2009 at 5:00 PM, Ashley > Sheridan wrote: > > On Thu, 2009-06-25 at 17:52 -0300, Martin Scotta wrote: > >> Hi all > >> > >> I have this in a simple routine... > >> > >> for($i=0, $if=count($array); $i<$if; ++$i) > >> if

Re: [PHP] Removing empty values from array

2009-06-25 Thread Robert Cummings
Eddie Drapkin wrote: On Thu, Jun 25, 2009 at 5:00 PM, Ashley Sheridan wrote: On Thu, 2009-06-25 at 17:52 -0300, Martin Scotta wrote: Hi all I have this in a simple routine... for($i=0, $if=count($array); $i<$if; ++$i) if( $array[$i] == '' ) { array_splice( $array, $i

Re: [PHP] Removing empty values from array

2009-06-25 Thread Eddie Drapkin
On Thu, Jun 25, 2009 at 5:00 PM, Ashley Sheridan wrote: > On Thu, 2009-06-25 at 17:52 -0300, Martin Scotta wrote: >> Hi all >> >> I have this in a simple routine... >> >> for($i=0, $if=count($array); $i<$if; ++$i) >>       if( $array[$i] == '' ) >>       { >>               array_splice( $array, $i,

Re: [PHP] Removing empty values from array

2009-06-25 Thread Ashley Sheridan
On Thu, 2009-06-25 at 17:52 -0300, Martin Scotta wrote: > Hi all > > I have this in a simple routine... > > for($i=0, $if=count($array); $i<$if; ++$i) > if( $array[$i] == '' ) > { > array_splice( $array, $i, 1); > > --$i; >

Re: [PHP] Removing empty values from array

2009-06-25 Thread Robert Cummings
Martin Scotta wrote: Hi all I have this in a simple routine... for($i=0, $if=count($array); $i<$if; ++$i) if( $array[$i] == '' ) { array_splice( $array, $i, 1); --$i; --$if; } My question: is this t

[PHP] Removing empty values from array

2009-06-25 Thread Martin Scotta
Hi all I have this in a simple routine... for($i=0, $if=count($array); $i<$if; ++$i) if( $array[$i] == '' ) { array_splice( $array, $i, 1); --$i; --$if; } My question: is this the better way to do it?