多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## lIndex, lGet ##### *Description* Return the specified element of the list stored at the specified key. 0 the first element, 1 the second ... -1 the last element, -2 the penultimate ... Return `<span class="calibre12">FALSE</span>` in case of a bad index or a key that doesn't point to a list. 根据索引值返回指定KEY LIST中的元素。0为第一个元素,1为第二个元素。-1为倒数第一个元素,-2为倒数第二个元素。如果指定了一个不存在的索引值,则返回FLASE。 ##### *Parameters* *key* *index* ##### *Return value* *String* the element at this index *Bool*`<span class="calibre12">FALSE</span>` if the key identifies a non-string data type, or no value corresponds to this index in the list `<span class="calibre12">Key</span>`. ##### *Example* ``` <pre class="calibre9">$redis->rPush('key1', 'A'); $redis->rPush('key1', 'B'); $redis->rPush('key1', 'C'); /* key1 => [ 'A', 'B', 'C' ] */ $redis->lGet('key1', 0); /* 'A' */ $redis->lGet('key1', -1); /* 'C' */ $redis->lGet('key1', 10); /* `FALSE` */ ```