Xiaobei_php+redis type combination use

WBOY
Release: 2016-07-30 13:31:27
Original
1377 people have browsed it

IPHP_REDIS type combination uses

I. Type combination description

After the introduction of the previous article, I already know that Redis has built -in data types such as string, collection, list, and hash.

Here we take an unordered set as an example to illustrate.

Simple diagram of set set1

1. From the diagram, you can see that set1 contains four elements, namely A, B, C, D

2. Based on previous understanding , the elements of the collection are of a single type. Generally, they are of string type. So, what if the elements of the collection are of other types? What about list, hash or collection? Does redis also support it?

2. Verification type combination use

1. Source code example

2. In the example, collection type1, stores one element, and the element is a list type

3. Verification results

Browser access to see

redis terminal to see

Attached:

The source code download address of this document

php_redis Chinese user manual

Copyright statement: This article is an original article by the blogger and may not be reproduced without the permission of the blogger.

The above introduces the use of Xiaobei_php+redis type combination, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!