您可以将PHP数组存储在Memcache中吗? [英] Can you store a PHP Array in Memcache?
本文介绍了您可以将PHP数组存储在Memcache中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您可以在Memcache中存储阵列吗?
我想存储;
- 用户ID号
- 用户的照片网址
- 用户名
一起作为一个数组,有人告诉我你可以,然后有人告诉我你不能 是哪一个?
Together as an array, someone told me you could and then someone told me you couldn't Which is it?
推荐答案
是.
Memcache::set('someKey', array(
'user_id' => 1,
'url' => 'http://',
'name' => 'Dave'
));
有关非常详细的示例,请参阅文档.
Please see the documentation for very detailed examples.
这篇关于您可以将PHP数组存储在Memcache中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文