note 79345 deleted from function.next by danbrown

From: Date: Mon, 20 Apr 2009 23:30:19 +0000
Subject: note 79345 deleted from function.next by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-153525@lists.php.net to get a copy of this message
Note Submitter: gigs at gigstaggart dot com ---- To GPatmore, I wrote a function almost just like yours to skip the last element when outputting something like CSV... It doesn't always work... I would think it wouldn't work at all and would cause the loop to skip every other element, but it doesn't. next() inside foreach instead returns false on some elements that may not be the last one... I don't know the cause yet. But don't do that. It's not safe. :)

« previous php.notes (#153525) next »