I have a menu that is generated from a database on a site that I am
fixing. The sub menu is defined by the 'parent' field. If the 'parent'
field matches the 'id' then it is a submenu of that item. I need to
generate a parent and submenu, and all its submenu's. How can I loop
through and find all the submenu's and submenu's of that.
Sorry if it is confusing, I'm just as confused...
Here is what im trying to do...
$sql = "SELECT * FROM `options` o order by posIndex";
$result = mysql_query($sql, $db) or die("<br />" . mysql_error());
while($arrRow = mysql_fetch_assoc($result))
{
if ($arrRow["parent"] = 2) // getting parent
item
{
echo $arrRow["displayText"]; // text
to display for link
if (THIS_ITEMS_ID =
PARENT_IN_ANY_OTHER_RECORD) //for each item that has a parent = 2
{
echo
$arrRow["displayText"]; // text to display for link
// also if
these have id's matching other parent fields...
}
}
}
Thanks for your help...
Eleno Davila
Gorman Learning Center
(909) 307-6312 ext 239
[Non-text portions of this message have been removed]
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/