ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## lRange, lGetRange ##### *Description* 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* ``` <pre class="calibre9">$redis->rPush('key1', 'A'); $redis->rPush('key1', 'B'); $redis->rPush('key1', 'C'); $redis->lRange('key1', 0, -1); /* array('A', 'B', 'C') */ ``` ##