For example, to publish an article that belongs to Category B. A message is automatically inserted into the database.
When I look at my article, how do I get the page to show breadcrumb navigation? as follows, I am a super novice, a lot of knock is not very clear, please advise.
Home >> Category A >> category B
Reply to discussion (solution)
/*select catid, Upid, the CatName from classification table performs a $a than the read array. is an array of */$a = array (' catid ' + 1, ' upid ' = = 0, ' catname ' = ' a '), array (' catid ' = 2, ' Upid ' = 1, ' catname ' = ' B '), $a = find_parent ($a, ' catid ', ' upid '); $res = Array (); $p =& $a [2]; The current article belongs to the category while ($p) { array_unshift ($res, $p [' catname ']); if (! isset ($p [' parent '])) break; $p =& $p [' Parent '] [$p [' Upid '];} echo Join (' >> ', $res);
function Find_parent See http://bbs.csdn.net/topics/370094009