在线工具
网站地图    收藏    合作   
<

快捷菜单 返回顶部

php操作redis

返回上层

List数据类型函数 - lRange - 命令/方法/函数

Returns the specified elements of the list stored at the specified key in the range [start, end]. start and stop are interpretated as indices: 0 the first element, 1 the second ... -1 the last element, -2 the penultimate ...

取得指定索引值范围内的所有元素。


Parameters

key start end


Return value

Array containing the values in specified range.


Example

$redis->rPush('key1', 'A');

$redis->rPush('key1', 'B');

$redis->rPush('key1', 'C');

$redis->lRange('key1', 0, -1); /* array('A', 'B', 'C') */


来源:https://www.daixiaorui.com/

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com