How to Cache variable value?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
aceSpec
Forum Newbie
Posts: 12
Joined: Fri Sep 24, 2010 10:13 am

How to Cache variable value?

Post by aceSpec »

Hey,

Im trying to do some caching in PHP and I have not clue what to do. I have a function that returns an array of XML objects. I want to cache this array and then access it later on.

Any ideas?
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: How to Cache variable value?

Post by Benjamin »

Research the serialize, file_put_contents and file_get_contents functions on php.net.
Post Reply