Jump to content


This topic is now archived and is closed to further replies.


menu question

Recommended Posts


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)

$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){
//inner loop to generate the sub menu
do {
$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>';
} while ($rowSubMenu = mysql_fetch_assoc($getSubMenu));
} while ($row = mysql_fetch_assoc($get));


Sorry about the formatting I couldn't get it right on the forum inputbox

Can anyone help


Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.