PHP 手册
上一页 |  | 下一页

# dbmnextkey

(PHP 3, PHP 4, PECL)

dbmnextkey --

## 说明

string dbmnextkey ( resource dbm_identifier, string key )

Returns the next key after `key`.

## 参数

`dbm_identifier`

  The DBM link identifier, returned by dbmopen().

`key`

  The previous key

## 返回值

The next key if possible

## 范例

By calling dbmfirstkey() followed by successive calls to dbmnextkey() it is possible to visit every key/value pair in the dbm database. For example:

例 1. Visiting every key/value pair in a DBM database

`<?php $key = dbmfirstkey($dbm_id); while ($key) { echo "$key = " . dbmfetch($dbm_id, $key) . "\n"; $key = dbmnextkey($dbm_id, $key); } ?>`

## 参见

dbmfirstkey()

上一页 | 起始页 | 下一页
dbminsert | 上一级 | dbmopen