andy2006 Posted September 3, 2006 Share Posted September 3, 2006 Hi I am trying to display list of links under the link just pressed.heres my code (which works, but it lists under the top link all of the time)[code]<?phpif($get){$i = 0;$menuArray = array(); $subMenuArray = array(); do {$menuArray[$i] = $row['title'];echo'<tr><td><div class="serviceLinks"><a href="services2.php?service='.$menuArray[$i].'&page='.$menuArray[$i].'"> '.$menuArray[$i].$i.'</a></td></div></tr><tr><td>';if ($getSubMenu){ echo'<table>';$x=0;//inner loop to generate the sub menudo {$subMenuArray[$x] = $rowSubMenu['pageTitle'];echo'<tr><td><div><a href="services2.php?service='.$subMenuArray[$x].$x.'&page='.$subMenuArray[$x].'"> '.$subMenuArray[$x].'</a></td></div></tr>';$x++;} while ($rowSubMenu = mysql_fetch_assoc($getSubMenu)); echo'</table>';}echo'</td></tr>';$i++;} while ($row = mysql_fetch_assoc($get));} ?>[/code]Sorry about the formatting I couldn't get it right on the forum inputboxCan anyone helpCheers Quote Link to comment Share on other sites More sharing options...
.josh Posted September 3, 2006 Share Posted September 3, 2006 i'm not even gonna bother looking at your code, as you didn't bother to format it right or use code or php tags. but judging from your question, it sounds to me like all you have to do is switch the position in your code in which they are echod. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.