dbmnextkey

(PHP3 , PHP4 )

dbmnextkey --  Retrieves the next key from a DBM database

Description

string dbmnextkey (int dbm_identifier, string key)

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

Példa 1. Visiting every key/value pair in a DBM database

  1 
  2 $key = dbmfirstkey ($dbm_id);
  3 while ($key) {
  4     echo "$key = " . dbmfetch ($dbm_id, $key) . "\n";
  5     $key = dbmnextkey ($dbm_id, $key);
  6 }
  7