sRem, sRemove

PHP Redis

sRem, sRemove

Description

Removes the specified member from the set value stored at key.

移除指定的VALUE从SET容器中

Parameters

key member

Return value

BOOL TRUE if the member was present in the set, FALSE if it didn't.

Example
$redis->sAdd('key1' , 'member1');
$redis->sAdd('key1' , 'member2');
$redis->sAdd('key1' , 'member3'); /* 'key1' => {'member1', 'member2', 'member3'}*/
$redis->sRem('key1', 'member2'); /* 'key1' => {'member1', 'member3'} */