I have a list of url's in a text file, as well as a description. I am pretty sure I know how to read those out of the text file, but, here is my predicament, I also have headings for the links.
Here is what the file looks like.
Music
www.musicmakestheworldgoround.com|Music makes the worlds' go round!
www.coalchamber.com|The official website of coal chamber
Stupid
www.thisandthat.com|The Official This and That webpage!
www.hereandnow.com|This is Here and Now's Official Website!
www.nowandagain.com|HomePage of now and again
News
www.cnn.com|The official CNN website
news.yahoo.com|Yahoo! News
www.microsoft.com|Microsoft News or Something
The format is:
Category
www.blah.com|Caption
THe category is ALWAYS one word, no separator, no special characters
the url may or may not have www., and I am thinking it may be easier if I add [url]http://[/url] before them, not sure. The separator character between the URL and caption is ALWAYS the | character. The caption may be words or a phrase, and may contain any special characters (mostly ! ' " ?)
Now, I can figure out how to read a list of links and output them, but how would I do it this way? THe other twist is, I only want the links in the categories printed if the page name matches the category. $pagename is on every page, with the proper category name.
So if I was on the news page, I want the links to outoput
Music Links
Stupid Links
News Links
-CNN
-Yahoo! News
-etc
-etc
Anyone got a place they can tell me to start to accomplish this?
I searched the forums but did not find anything very helpful.