1

I am trying to figure out how add multiple items to zset via the phpredis zadd method. Something like the following

ZADD myzset 2 "two" 3 "three"

mmohiudd
  • 310
  • 2
  • 10

1 Answers1

3

According to the documentation, you can pass the pairs of score/value.

$redis->zAdd('myzset', 2, 'two', 3, 'three');
Jason McCreary
  • 71,546
  • 23
  • 135
  • 174
  • Description: Add one or more members to a sorted set or update its score if it already exists - looks like completely missed this part. Thanks! – mmohiudd Mar 13 '15 at 17:29