<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18876">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>I have the following php snippet giving me a list
of taxonomy terms for a certain vocab and certain content type. </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial><?php<BR>$vid = 4;<BR>$items = array();<BR>$type
= manager;<BR>$terms = taxonomy_get_tree($vid);<BR>foreach ( $terms as $term ) {
<BR> $count = db_result(db_query("SELECT COUNT(term_node.nid)
FROM {term_node} JOIN {node} ON node.nid = term_node.nid WHERE node.type = '%s'
AND tid = %d", $type, $term->tid)); <BR><STRONG> $items[] =
l($term->name, "personnel-search?type=$term->tid") . "
($count)";<BR></STRONG>}<BR>if ( count($items) ) { print
theme('item_list', $items);}<BR>?></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>the problem is in the bolded line, specifically the
question mark and equal sign. I get a taxonomy list like this:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>retail (3)</FONT></DIV>
<DIV><FONT size=2 face=Arial>accounts (2)</FONT></DIV>
<DIV><FONT size=2 face=Arial>IT (1)</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>when I hover over these, the links look perfect
down in the status bar, but when I click on them, they come out in the URL bar
as such:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>...personnel-search</FONT><FONT size=2
face=Arial><STRONG>%3F</STRONG>type<STRONG>%3D</STRONG>25</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>and thus give me a 404. Is there an easy way of
encoding it right?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>thanks<BR><BR>Neil</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV></BODY></HTML>