ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## hVals ##### *Description* Returns the values in a hash, as an array of strings. 取得HASH表中所有的VALUE,以数组形式返回。 ##### *Parameters* *Key*: key ##### *Return value* An array of elements, the values of the hash. This works like PHP's array\_values(). ##### *Example* ``` <pre class="calibre16">$redis->delete('h'); $redis->hSet('h', 'a', 'x'); $redis->hSet('h', 'b', 'y'); $redis->hSet('h', 'c', 'z'); $redis->hSet('h', 'd', 't'); var_dump($redis->hVals('h')); ``` Output: ``` <pre class="calibre16">array(4) { [0]=> string(1) "x" [1]=> string(1) "y" [2]=> string(1) "z" [3]=> string(1) "t" } ``` The order is random and corresponds to redis' own internal representation of the set structure. ##