Forums

PHP

This topic is locked

need help

Posted 18 Sep 2008 11:07:25
1
has voted
18 Sep 2008 11:07:25 taran k posted:
i am creating dynamic menu , fetching data from mysql and then storing in the array and passing that array value to javascript array and now i want to show the value as link . in my loop $menu1 is array in which already have value, fom where i am passing the value to show in menu, tried so many things but giving array.

foreach($MENU1 as $key => $value)
{
// echo "menus1[$key] = '$value'+'<br >'\n;\n";
// echo "menus1[$key] = '<a href=>' '$value' + '<br>' '</a>'";
echo '<a href="viewproducts.php?id=' . $value . '">' . $value . ' ' . <br> . '</a>';

//echo "menus1[$key]=<a href=viewproducts.php?sortname=$value>$value+<br></a>";
//echo '<a href="viewproducts.php?sortname='.$value.'"> PRINT RECEIPT </a>';
//echo "<a href=viewproducts.php?sortname="$value">" .menus1[$key]."</a>";

}

Reply to this topic