RE: [PHP] assoc array question
| From: | David Freeman | Date: | Thu, 15 Aug 2002 22:03:19 +0000 |
| Subject: | RE: [PHP] assoc array question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-112869@lists.php.net to get a copy of this message | ||
> while (list ($key, $val) = each ($info))
> {
> do stuff
> }
$count = 0;
$last = sizeof($info);
While (list($key, $val) = each($info))
{
if ($count == 0)
{
// first time through
}
if ($count == $last)
{
// last time through
}
// do stuff
$count++;
}