I need Specific Guideline

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
soul|fly
Forum Newbie
Posts: 8
Joined: Sat Feb 14, 2009 7:51 am

I need Specific Guideline

Post by soul|fly »

Hi there. How are you all?

I'm a good web designer but I'm not good at PHP. I have very very basic knowledge about it. Recently I'm doing a very little project which I have to complete by this month and severely stucked in a point. No completed project, No income :( . Please Help.

Details:
suppose, there will be a file called items.txt in server public_html. That items.txt will contain data as follows:

item name item URL
handbag5801 http://xxsx./handbag5801.html
hangbag2513 http://xxsx./handbag2513.html
.
.
total 100 items and links

The task i have to do is that on the right sidebar of wordpress, i have to show 10 items name with their links randomly selected from those 100 items. like this: hangbag5801, handbag2513, up to 10 links in sidebar in a box. So, whenever i refresh my browser its needed to get changed to new 10 list randomly.

If you could refer to any exiting php codes or similar tutorials or wordpress plugin, it would have been a great relief. Is it possible by php? Please guide me.

THanks
Last edited by soul|fly on Sat Feb 14, 2009 10:20 am, edited 1 time in total.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: PLEASE HELP... MY MINI PROJECT.. SPECIFIC GUIDELINE REQUIRED

Post by John Cartwright »

Please change your title to something appropriate. Firstly, we are here to help you so do not include, ever, stuff like "PLEASE HELP" or "URGENT". Typically, users will skip threads like this because you are suggesting your thread is more important than others. Secondly, it is important to use a descriptive title so users can decide if they would like to participate on a particular subject. Thirdly, all caps are the equivilent to shouting on forums. What I'm trying to say is please change your title, and use better titles in the future.

As for your problem

1. file() to load the file into into an array
2. shuffle() the array
3. for() loop grabbing first 10 items
soul|fly
Forum Newbie
Posts: 8
Joined: Sat Feb 14, 2009 7:51 am

Re: I need Specific Guideline

Post by soul|fly »

Im sorry sir. I should have read before post.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: I need Specific Guideline

Post by John Cartwright »

Thanks, let us know if you need any more help.
soul|fly
Forum Newbie
Posts: 8
Joined: Sat Feb 14, 2009 7:51 am

Re: I need Specific Guideline

Post by soul|fly »

Im afraid if I ask anything stupid again! :)

A little more deep code help would have been appreciated more if you dont mind.

Thank you again
Attachments
problem.jpg
problem.jpg (34.06 KiB) Viewed 81 times
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: I need Specific Guideline

Post by John Cartwright »

What have you tried so far? Can't expect to learn (the point of this place) if you don't try ;)
Post Reply