phpfab Posted May 19, 2009 Share Posted May 19, 2009 Hi I m new to using PHP, in fact I know almost nothing. The script down below is "called" into another file through <?php include("config/menu_bottom.inc.php"); ?> to populate a a navigation menu. Each $obj->setLink is displayed horizontally within the table through <?php $obj->getLinks($lng); ?> Question: how can I get the same result vertically displayed ( as in a list ) ? Thanks <?php include("php/nav.class.php"); $obj = new Nav; $obj->setLocation($location); $obj->setEstilo('<a class="linkgreen" href="', '">', '</a>');//the properties of the links $obj->setEstiloCur('<a class="linkblue" href="', '">', '</a>');//the properties of the visited link $obj->setSeparador(' <span style="color: #6699CC; font-weight:bold; font-family:Arial, Helvetica, sans-serif; letter-spacing:0.2em;">|</span> '); $obj->setLink('#', 'What is Berlin?', 'whatissb.php'); $obj->setLink('#', 'Location', 'location.php'); $obj->setLink('#', 'Houses', 'houses.php'); $obj->setLink('#', 'Services', 'services.php'); $obj->setLink('#', 'Booking', 'booking.php'); $obj->setLink('#', 'Contact', 'contact.php'); $obj->setLink('#', 'Links', 'links.php'); $obj->setLink('#', 'Gallery', 'gallery.php'); ?><table width="600" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="5" valign="middle"></td> </tr> <tr> <td height="40" align="center" valign="middle"><?php $obj->getLinks($lng); ?></td> </tr> <tr> <td height="5" valign="middle" class="dotted"></td> </tr> </table> Link to comment https://forums.phpfreaks.com/topic/158690-obj-setlin-and/ Share on other sites More sharing options...
Ken2k7 Posted May 19, 2009 Share Posted May 19, 2009 Change the way $obj->getLinks() method outputs the HTML. Link to comment https://forums.phpfreaks.com/topic/158690-obj-setlin-and/#findComment-836931 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.