<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/php/tags/category</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sun, 19 May 2013 20:06:00 GMT</pubDate>
<item>
<title>(PHP) filter out by category - tomle123</title>
<link>http://snipplr.com/view/70916/filter-out-by-category/</link>
<description><![CDATA[ <p>filter out by category ID in Magento</p> ]]></description>
<pubDate>Wed, 24 Apr 2013 06:11:23 GMT</pubDate>
<guid>http://snipplr.com/view/70916/filter-out-by-category/</guid>
</item>
<item>
<title>(PHP) Wordpress Custom Menu For Different Category/Page/Post - hell0world</title>
<link>http://snipplr.com/view/69088/wordpress-custom-menu-for-different-categorypagepost/</link>
<description><![CDATA[ <p>[register_nav_menus](http://codex.wordpress.org/Function_Reference/register_nav_menus,"register_nav_menus")
[wp_nav_menu](http://codex.wordpress.org/Function_Reference/wp_nav_menu,"wp_nav_menu")
[in_category](http://codex.wordpress.org/Function_Reference/in_category,"in_category")
[is_category](http://codex.wordpress.org/Function_Reference/is_category,"is_category")</p> ]]></description>
<pubDate>Thu, 13 Dec 2012 04:03:51 GMT</pubDate>
<guid>http://snipplr.com/view/69088/wordpress-custom-menu-for-different-categorypagepost/</guid>
</item>
<item>
<title>(PHP) Wordpress wp_get_archives for a specific category - i-am-andy</title>
<link>http://snipplr.com/view/67166/wordpress-wpgetarchives-for-a-specific-category/</link>
<description><![CDATA[ <p>Get Wordpress wp_get_archives for a specific category... by default it sghows all categorys</p> ]]></description>
<pubDate>Thu, 13 Sep 2012 02:12:28 GMT</pubDate>
<guid>http://snipplr.com/view/67166/wordpress-wpgetarchives-for-a-specific-category/</guid>
</item>
<item>
<title>(PHP) Magento - stalal</title>
<link>http://snipplr.com/view/65040/magento/</link>
<description><![CDATA[ <p>Get Magento product by specific category id (Magento version 1.7)</p> ]]></description>
<pubDate>Wed, 23 May 2012 21:10:46 GMT</pubDate>
<guid>http://snipplr.com/view/65040/magento/</guid>
</item>
<item>
<title>(PHP) EE Category Channel Example - ryarwood</title>
<link>http://snipplr.com/view/62878/ee-category-channel-example/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 30 Jan 2012 08:47:36 GMT</pubDate>
<guid>http://snipplr.com/view/62878/ee-category-channel-example/</guid>
</item>
<item>
<title>(PHP) WP Custom Posts Sidebar - For Cat Exclusion - ryarwood</title>
<link>http://snipplr.com/view/62858/wp-custom-posts-sidebar--for-cat-exclusion/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 30 Jan 2012 08:47:16 GMT</pubDate>
<guid>http://snipplr.com/view/62858/wp-custom-posts-sidebar--for-cat-exclusion/</guid>
</item>
<item>
<title>(PHP) WP Restrict Category Types in Main Post - ryarwood</title>
<link>http://snipplr.com/view/60463/wp-restrict-category-types-in-main-post/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 02 Nov 2011 05:11:26 GMT</pubDate>
<guid>http://snipplr.com/view/60463/wp-restrict-category-types-in-main-post/</guid>
</item>
<item>
<title>(PHP) Get the top level category from any category in Wordpress - djmosc</title>
<link>http://snipplr.com/view/60189/get-the-top-level-category-from-any-category-in-wordpress/</link>
<description><![CDATA[ <p>Just insert any category id into the argument and it will return the top level category object.

e.g: print_r( get_top_level_category('INSERT CATEGORY ID HERE') );</p> ]]></description>
<pubDate>Wed, 26 Oct 2011 04:22:51 GMT</pubDate>
<guid>http://snipplr.com/view/60189/get-the-top-level-category-from-any-category-in-wordpress/</guid>
</item>
<item>
<title>(PHP) wp list categories with total number of posts in parenthises ( )  some usefull examples - webtechdev</title>
<link>http://snipplr.com/view/59553/wp-list-categories-with-total-number-of-posts-in-parenthises----some-usefull-examples/</link>
<description><![CDATA[ <p>Show wp categories in drop down list like ...</p> ]]></description>
<pubDate>Sat, 08 Oct 2011 06:57:43 GMT</pubDate>
<guid>http://snipplr.com/view/59553/wp-list-categories-with-total-number-of-posts-in-parenthises----some-usefull-examples/</guid>
</item>
<item>
<title>(PHP) Custom post type tags/categories archive page - IronMANro</title>
<link>http://snipplr.com/view/58834/custom-post-type-tagscategories-archive-page/</link>
<description><![CDATA[ <p>add this in functions.php</p> ]]></description>
<pubDate>Tue, 20 Sep 2011 17:24:30 GMT</pubDate>
<guid>http://snipplr.com/view/58834/custom-post-type-tagscategories-archive-page/</guid>
</item>
<item>
<title>(PHP) LOS MAS VISTOS POR CATEGORIA, WORDPRESS - serialk89</title>
<link>http://snipplr.com/view/53902/los-mas-vistos-por-categoria-wordpress/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 21 May 2011 05:34:42 GMT</pubDate>
<guid>http://snipplr.com/view/53902/los-mas-vistos-por-categoria-wordpress/</guid>
</item>
<item>
<title>(PHP) LA ULTIMA CATEGORIA VISTA, WORDPRESS - serialk89</title>
<link>http://snipplr.com/view/53900/la-ultima-categoria-vista-wordpress/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 21 May 2011 05:10:49 GMT</pubDate>
<guid>http://snipplr.com/view/53900/la-ultima-categoria-vista-wordpress/</guid>
</item>
<item>
<title>(PHP) OpenCart Main Category - odenijs</title>
<link>http://snipplr.com/view/53587/opencart-main-category/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 14 May 2011 23:23:25 GMT</pubDate>
<guid>http://snipplr.com/view/53587/opencart-main-category/</guid>
</item>
<item>
<title>(PHP) Use category slug as CSS class - Pr0v4</title>
<link>http://snipplr.com/view/53533/use-category-slug-as-css-class/</link>
<description><![CDATA[ <p>This snippet will help you to use the mother category, the ones with parent => 0, as your classes ready to be stylezed in your CSS!</p> ]]></description>
<pubDate>Sat, 14 May 2011 00:02:39 GMT</pubDate>
<guid>http://snipplr.com/view/53533/use-category-slug-as-css-class/</guid>
</item>
<item>
<title>(PHP) Get category id by name - athanassiadis</title>
<link>http://snipplr.com/view/53305/get-category-id-by-name/</link>
<description><![CDATA[ <p>How to get a category id from the name of the category</p> ]]></description>
<pubDate>Wed, 11 May 2011 00:26:56 GMT</pubDate>
<guid>http://snipplr.com/view/53305/get-category-id-by-name/</guid>
</item>
<item>
<title>(PHP) Thesis: remove headline from category page/archive - psteinweber</title>
<link>http://snipplr.com/view/52749/thesis-remove-headline-from-category-pagearchive/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 28 Apr 2011 20:01:52 GMT</pubDate>
<guid>http://snipplr.com/view/52749/thesis-remove-headline-from-category-pagearchive/</guid>
</item>
<item>
<title>(PHP) Thesis: exclude category from blogpage - psteinweber</title>
<link>http://snipplr.com/view/52745/thesis-exclude-category-from-blogpage/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 28 Apr 2011 19:57:32 GMT</pubDate>
<guid>http://snipplr.com/view/52745/thesis-exclude-category-from-blogpage/</guid>
</item>
<item>
<title>(PHP) Magento echo all category links - nico65</title>
<link>http://snipplr.com/view/52655/magento-echo-all-category-links/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 27 Apr 2011 19:16:10 GMT</pubDate>
<guid>http://snipplr.com/view/52655/magento-echo-all-category-links/</guid>
</item>
<item>
<title>(PHP) Wordpress Get Root Category - widescape</title>
<link>http://snipplr.com/view/47796/wordpress-get-root-category/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 24 Jan 2011 22:20:23 GMT</pubDate>
<guid>http://snipplr.com/view/47796/wordpress-get-root-category/</guid>
</item>
<item>
<title>(PHP) Simple category tree - graceman9</title>
<link>http://snipplr.com/view/44889/simple-category-tree/</link>
<description><![CDATA[ <p>Как сделать вывод из нескольких таблиц (php mysql)
 
Итак, имеем:
Три таблицы - articles, categories и sections. По иерархии - в sections включаются categories, а в categories включаются articles. По таблицам это выглядит так:

Articles(id, title, categoryID, sectionID)
Categories(id, title, sectionID)
Sections(id, title)

То есть ключевым является id в каждой таблице, и именно с помошью его надо определять какая категория относится к какому разделу и какая статья относится к какой категории.

Нужно:
Сделать запрос в базу данных, получить данные и создать из них, наверно, массив.
Затем вывести данные в формате:
Section1
Category1_of_Section1
Article1_of_Category1
Article2_of_Category1
Article3_of_Category1
...
ArticleN_of_Category1
Category2_of_Section1
Article1_of_Category2
Article2_of_Category2
...
ArticleN_of_Category2
Category3_of_Section1
...
CategoryN_of_Section1
Section2
...
SectionN

То есть чтобы выводились все разделы по очереди, и при этом каждый включал в себя категории, которые относятся к нему. А каждая категория, в свою очередь, включала в себя статьи, которые относятся к ней.

Как это можно сделать? php и mysql.</p> ]]></description>
<pubDate>Fri, 26 Nov 2010 06:04:15 GMT</pubDate>
<guid>http://snipplr.com/view/44889/simple-category-tree/</guid>
</item>
</channel>
</rss>