k2hpx_find_get_value
Gets value using the k2hash file handle to search for keys
Description
string k2hpx_find_get_value ( mixed $findhandle_res )
Gets value using the k2hash file handle to search for keys.
Parameters
- findhandle_res
Specifies the k2hash file handle that k2hpx_find_first returns.
Return Values
Returns value of each key.
Examples
- Example 1 - Gets value using the k2hash file handle to search for keys
<?php
$handle = k2hpx_open_mem();
k2hpx_set_value($handle, "test1", "value1");
k2hpx_set_value($handle, "subkey1", "sub-value1");
k2hpx_add_subkey($handle, "test1", "subkey1");
$findhandle = k2hpx_find_first($handle);
var_dump($findhandle);
var_dump(k2hpx_find_get_value($findhandle));
k2hpx_find_free($findhandle);
k2hpx_close($handle);
?>
The above example will output:
resource(5) of type (k2hfindhandle)
string(6) "value1"
See Also
- k2hpx_find_first - Gets the k2h file handle to search for the key
- k2hpx_find_free - Releases resources of the k2h file handle to search for keys
- k2hpx_find_get_key - Gets keys using the k2h file handle to search for keys
- k2hpx_find_get_subkeys - Gets keys using the k2h file handle to search for keys with linked with each key
- k2hpx_find_next - Advances the internal pointer of the k2h file handle to search for keys