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!
I'm using the following code to generate an XML file, but I keep getting the following warning. I'm not sure what the problem is, perhaps it's getting confused because of the = sign, but it gets past the one after "module" just fine. I tried using ≡ but that didn't work either.
XML Parsing Error: not well-formed
Location: http://www.realitygrp.com/xml.php?mode=links
Line Number 3, Column 64:
<link name=">Current Events" ref="home.php?module=Category&cat=37"/>
-----------------------------------------------------------------^
echo "<links name=\"FEATURED CHANNELS\">\n";
// LOOP
$CATS = new DB;
$CATS->query("SELECT id FROM category WHERE parentid = 0 ORDER BY id");
// IF WE'RE ON A SUB NAV, GET THE TOP LEVEL CATEGORY
$TOPCAT = $THISCATEGORY->parent_path[1];
foreach ($CATS->all_rows AS $category) {
$NAVIGATION = new Category;
$NAVIGATION->GetById($category['id']);
echo "\t<link name=\">{$NAVIGATION->title}\" ref=\"home.php?module=Category&cat={$NAVIGATION->id}\"/>\n";
}
echo "</links>\n";
Haha, I know what you mean. This project is exactly that, just experimenting with a few different modular systems... I like how segregated the code is, but there are other things I don't like.
FYI, I don't think I have an extra >, that's used as a bullet next to the link, and is inside quotes, shouldn't matter... I dont think
Thanks for the XML tips, I'll take a look in a few hours when I get home.