4851 explained code solutions for 97 technologies

php-redisGet array from Redis

The best way to store to and get arrays from Redis is to use Redis lists:

$redis->lrange('list2', 0, -1)ctrl + c

returns specified elements from the list


name of the key to get array from (should be a Redis list)

0, -1

offset and limit to use for the elements (0, -1 - get all elements from start)