Hi,

I am working on replacing strings in a navigation file.  I need to be able to
assemble the left navigation from a table.  My problem is the function code
gets placed above where it should appear in the template.

Here is what I have:

$temp5 = str_replace("[LEFT NAV]",call_leftnav(),$temp4);
echo $temp5;

function call_leftnav()
{
print ("<table border=0 cellpadding=0 cellspacing=0><tr><td 
width=90%>&nbsp;</td><td>&nbsp;</td></tr>");
$connection = mssql_connect("localhost","webuser","");
$db = mssql_select_db("wmn_test",$connection);
$sql = "select bp_section_id,bp_section_name from bp_sections order by 
bp_section_name";
$sql_result = mssql_query($sql);
while ($row = mssql_fetch_array($sql_result)){
$bp_section_id = $row["bp_section_id"];
$bp_section_name = $row["bp_section_name"];
print ("<tr><td><a 
href=\"bpsection.php?section=$bp_section_id\">$bp_section_name</a></td><td></td></tr>");
};
print ("</table>");
};
?>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to