## lSet
##### *Description*
Set the list at index with the new value.
根据索引值设置新的VAULE
##### *Parameters*
*key* *index* *value*
##### *Return value*
*BOOL*`<span class="calibre12">TRUE</span>` if the new value is setted. `<span class="calibre12">FALSE</span>` if the index is out of range, or data type identified by key is not a list.
如果设置成功返回TURE,如果KEY所指向的不是LIST,或者索引值超出LIST本身的长度范围,则返回flase。
Iset函数更像是UPDATE或者EDIT的概念,而不是INSERT或者ADD的概念,顾只能在LIST本身的长度范围内,而不能超出。
##### *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->lSet('key1', 0, 'X');
$redis->lGet('key1', 0); /* 'X' */
```
- php-redis中文帮助手册
- 系统及通用函数
- construct
- connect,open
- pconnect, popen
- close
- setOption
- getOption
- ping
- echo
- randomKey
- select
- move
- rename, renameKey
- renameNx
- setTimeout,expire,pexpire
- expireAt,pexpireAt
- keys,getKeys
- dbSize
- auth
- bgrewriteaof
- slaveof
- object
- save
- bgsave
- lastSave
- type
- flushDB
- flushAll
- sort
- info
- resetStat
- ttl, pttl
- persist
- config
- eval
- evalSha
- script
- getLastError
- _prefix
- _unserialize
- dump
- restore
- migrate
- time
- String数据类型函数
- get
- set
- setex, psetex
- setnx
- del, delete
- getSet
- multi, exec, discard
- watch, unwatch
- subscribe
- publish
- exists
- incr, incrBy
- incrByFloat
- decr, decrBy
- mGet, getMultiple
- append
- getRange
- setRange
- strlen
- getBit
- setBit
- bitop
- bitcount
- mset, msetnx
- List数据类型相关函数
- lPush
- rPush
- lPushx
- rPushx
- lPop
- rPop
- blPop, brPop
- lSize
- lIndex, lGet
- lSet
- IRange,IGetRange
- lTrim,listTrim
- lRem,lRemove
- lInsert
- rpoplpush
- brpoplpush
- Set数据类型相关函数
- sAdd
- sRem, sRemove
- sMove
- sIsMember, sContains
- sCard, sSize
- sPop
- sRandMember
- sInter
- sInterStore
- sUnion
- sUnionStore
- sDiff
- sDiffStore
- sMembers, sGetMembers
- zSet数据类型相关函数
- zAdd
- zRange
- zDelete,zRem
- zRevRange
- zRangeByScore, zRevRangeByScore
- zCount
- zRemRangeByScore,zDeleteRangeByScore
- zRemByRank,zDeleteRangeByRank
- zSize,zCard
- zScore
- zRank,zRevRank
- zIncrBy
- zUnion
- zInter
- Hash数据类型相关函数
- hSet
- hSetNx
- hGet
- hLen
- hDel
- hKeys
- hVals
- hGetAll
- hExists
- hIncrBy
- hIncrByFloat
- hMset
- hMGet