[tpm] how to delete array entries en-passant
fulko.hew at gmail.com
Wed Jun 30 09:35:37 PDT 2010
On Wed, Jun 30, 2010 at 12:31 PM, <arocker at vex.net> wrote:
> > OK, let me give you the specific example...
> > The array contains all of the lines of a file...
> > The foreach is used to loop over then, and 'take action' upon them.
> > But when I'm done I want all the empty lines stripped from the array
> > ('just
> > because!')
> Does the process require the presence of the entire file in memory before
> the loop, and the shuffled-down file afterwards? Do you output the
> remaining lines?
No, but I need to output the 'remaining' lines.
Also I forgot to mention, the reason the original data was in an array, was
it came from one of two sources... slurping a file, or a 'received' string.
So I thought I'd first normalize either dataset into the array I would then
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the toronto-pm