9951 explained code solutions for 126 technologies


php-redisRedis hash usage example


$redis->hset('h1', 'name', 'Donald');
$redis->hset('h1', 'age', '120');

$redis->hgetall('h1');ctrl + c
$redis

Redis object after connection

hset

sets hash key and value

hgetall

gets all key/values from hash

'h1'

name of the hash to save/get