<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated on Tue, 18 Nov 2008 03:51:11 -0600 -->
<rss version="2.0">
  <channel>    <title>Codeassembly - How to display infinite depth expandable categories using php and javascript</title>
    <link>http://www.codeassembly.com/feed/comments/22</link>
    <description>CodeAssembly - Simplicity is prerequisite for reliability - Comments</description>
    <language>en-us</language>
    <managingEditor>contact@codeassembly.com</managingEditor>
    <webMaster>contact@codeassembly.com</webMaster>
    <generator>RSS Feed Generator</generator>
    <item>
      <title>rocbar</title>
      <description>Very good script, but the article could be a little more in detail explaining the variable $has_childs = false; in relationship to the $menu_array or the if ($value['parent'] == $parent).  This would be helpfull for a newbee like me. </description>
      <link>http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#157</link>
      <pubDate>2008-08-23 23:02:45</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#157</guid>
    </item>
    <item>
      <title>Terry</title>
      <description>Hi, I have downloaded the menu version and am wondering how to implement an image arrow bullet for the parent categories to show there are children  while recursive function sorts down the levels. Can't seem to make it work any thoughts??
thanks Terry</description>
      <link>http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#153</link>
      <pubDate>2008-08-21 16:33:14</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#153</guid>
    </item>
    <item>
      <title>Ashish</title>
      <description>This is such a wonderful script....It really helps me to show the category tree like site map.
Thanx a lot</description>
      <link>http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#135</link>
      <pubDate>2008-06-26 08:51:54</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#135</guid>
    </item>
    <item>
      <title>titel</title>
      <description>Hi,

I was reading your article today and this is exactly what I need for the project I'm working on.

One think though, is there any way that the script is aware of the hierarchy when it displaying the URL as well?

I'll jut give you an example. Say we have
Web development - /web-development
 - - Javascript - /web-development/javascript
 - - - - AJAX - /web-development/javascript/ajax

Again, very good article and thanks a lot,
titel</description>
      <link>http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#129</link>
      <pubDate>2008-06-13 15:17:10</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#129</guid>
    </item>
    <item>
      <title>MacGoerk</title>
      <description>Actually i think this has something to do with the use of a global var.

If you change the function to

generate_menu($parent, $menu_array) {

remove the line "global $menu_array;"

change the inner recursive call to generate_menu($key, $menu_array)

and the initial call to the recursive function to generate_menu(0, $menu_array) where $menu_array is your mysql result set

it will work!
As php SHOULD make use of pointers and call_by_reference, this will indeed result in a slightly higher memory usage. If it isn't this is just ... going to be exponential large if you have a deeply nested structure. However I'll try this way :)

Also, change the mysqli_whatever calls to mysql_whatever, as mysqli is deprecated.

HTH
Mac</description>
      <link>http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#99</link>
      <pubDate>2008-05-01 14:22:23</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#99</guid>
    </item>
    <item>
      <title>Ken</title>
      <description>Hi, It looks like this script has a bug. I also has problem listing all of the categories. It starts nicely by listing Web development og followed by Php, but then it stops. 

It really seems like the loop does stops when the last sub categori does not contain a new sub. Because if you add a new sub cat. it will be listed.

Ok? Some ideas? </description>
      <link>http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#78</link>
      <pubDate>2008-03-05 07:58:50</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#78</guid>
    </item>
    <item>
      <title>Mk</title>
      <description>Hi.  This code is great!  But one problem: I copied the code straight from this page, and it works fine, except for one thing.  I don't want the category names to be linked.  I only want the subcategories to be linked.  In the example displayed on this page, the category names are not linked, and this is how I want it, but when I copied the code, it makes them links.  How do I fix this?

</description>
      <link>http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#77</link>
      <pubDate>2008-03-21 14:02:43</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#77</guid>
    </item>
    <item>
      <title>Eric</title>
      <description>Hi,

I'm having the same problems as Schalk & Jason whereby only "Web Development" & "Php" are printing.  It stops there.

Can anyone else get this to work?

Thanks</description>
      <link>http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#71</link>
      <pubDate>2008-03-21 14:02:43</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#71</guid>
    </item>
    <item>
      <title>Stefan</title>
      <description>Hi,

I discovered a problem when using the script in 
combination with prototype.

The fix is simple ...

file:expand.js line:12

-- OLD --
for(i in cookieA)

-- NEW --
for(i=0;i<cookieA.length;i++)


Prototype adds some generic methods so using the "for in"-iteration causes errors.


cheers

Stefan</description>
      <link>http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#70</link>
      <pubDate>2008-03-21 14:02:43</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#70</guid>
    </item>
    <item>
      <title>Jason</title>
      <description>Hi

Having the same problem as Schalk above - works perfectly on one host but not on another?

Is there a specific PHP module that has to be enabled/installed for this to work?

Regards

Jason
</description>
      <link>http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#40</link>
      <pubDate>2007-11-26 07:32:42</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#40</guid>
    </item>
    <item>
      <title>Schalk</title>
      <description>Hi,

I have been looking for something like this for ages, thank you so much! I just have one problem, and I'm sure it would just require a little tweaking of some sorts...When the initial parent level (0) is generated, the only 0 level links that is displayed is 'Web Development' with 'PHP" underneath and that's it! Do you know why this is happening, or even better how I can fix it?

Many Thanks in advance Schalk</description>
      <link>http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#29</link>
      <pubDate>2007-11-09 08:39:34</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#29</guid>
    </item>
    <item>
      <title>kasp3r</title>
      <description>Thank you very much for your article. It helped me a lot! </description>
      <link>http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#15</link>
      <pubDate>2007-11-19 08:52:58</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#15</guid>
    </item>
    <item>
      <title>CodeAssembly</title>
      <description>Yes, your observation is correct, I removed the links from top categories, because I don't have those categories on my website, and I don't like putting # on my links.
Thanks.</description>
      <link>http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#10</link>
      <pubDate>2007-11-19 08:53:44</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#10</guid>
    </item>
    <item>
      <title>Jason</title>
      <description>The css version doesn't seem to function as per your example i.e. the first item in the menu has href link but should be just text?

Hope that makes sense - great tutorial though :-)

Regards

Jason</description>
      <link>http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#8</link>
      <pubDate>2007-10-05 16:02:58</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/#8</guid>
    </item>
  </channel></rss>