XML for nav

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
rnoack
Forum Commoner
Posts: 34
Joined: Mon May 03, 2010 12:38 am

Re: XML for nav

Post by rnoack »

You just have to parse the file...

if you wrote some code and its not working post it here and someone will try to help, but I don't think anyone wants to write the entire page for you.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: XML for nav

Post by requinix »

Once you have a PHP script handling those URLs (like with a RewriteRule), you can look at $_SERVER["REQUEST_URI"] to get the path. So now you have /home/la.

With SimpleXML you can load the XML and check for a ->home->la node. If it's there then you grab the title, otherwise you don't.
rnoack
Forum Commoner
Posts: 34
Joined: Mon May 03, 2010 12:38 am

Re: XML for nav

Post by rnoack »

what is the error? i never really used xml with php so not sure if i can help
Post Reply