'; if(!isset($_GET['category'])){ while ($row = mysql_fetch_assoc($result)){ $name = ($f)?$row['pubname']:$row['category']; if($name=='PublishLike'){ $first = " ".$name." ".$row['publisherid']." "; }else{ $res .= " ".$name." ".$row['publisherid']." "; } } }else{ while ($row = mysql_fetch_assoc($result)){ $name = ($f)?$row['pubname']:$row['subcategory']; if($name=='PublishLike'){ $first = " ".$name." ".$row['publisherid']." "; }else{ $res .= " ".$name." ".$row['publisherid']." "; } } } $xml .= $first.$res; echo $xml.""; ?>