Please help about array

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
mahfuzit
Forum Newbie
Posts: 3
Joined: Tue Feb 24, 2009 10:26 pm
Location: Bangladesh

Please help about array

Post by mahfuzit »

Hello I am learning php. I have a problem about array. I am trying to describe it.......

Suppose I have created the following array.
$internet = array("forum", "blog", "website");
I have not assigned the key and it will automatically be assigned. Now I want that the values of this array ("forum", "blog", "website") will be stored in a txt file. And if I add or delete on of these values in the txt file the $internet varriable will automatically change. Finally, I want to use the following code:
ksort ($internet);
I hope it is clear to you that what my problem is? :)
User avatar
php_east
Forum Contributor
Posts: 453
Joined: Sun Feb 22, 2009 1:31 pm
Location: Far Far East.

Re: Please help about array

Post by php_east »

these two functions would be sufficient for your purpose.
1. file_put_contents
2. file_get_contents
Post Reply