<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Creating a Table of Contents Generator in PHP</title>
	<atom:link href="http://www.webdesignlessons.com/creating-a-table-of-contents-generator-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webdesignlessons.com/creating-a-table-of-contents-generator-in-php/</link>
	<description></description>
	<lastBuildDate>Fri, 03 Feb 2012 12:32:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Nathan</title>
		<link>http://www.webdesignlessons.com/creating-a-table-of-contents-generator-in-php/#comment-1513</link>
		<dc:creator>Nathan</dc:creator>
		<pubDate>Fri, 30 Oct 2009 20:18:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdesignlessons.com/?p=295#comment-1513</guid>
		<description>Hi,

Thanks for sharing your function! It definitely saved me some time.

You&#039;ve got a few bugs that I came across:

- your regex assumes that there won&#039;t be any tags within a heading, so having a &quot;strong&quot; tag around a word in your heading, for instance, causes the heading to be missed by the regex

- when you start your nested list, you end up with an extra li. The nested ul should be within the li tag of its &quot;parent&quot;. If you style your li with bullets you&#039;ll see what I&#039;m talking about.

- the $Sections array isn&#039;t being constructed quite right. do a print_r on it and you&#039;ll see what I mean... you just need to remove the $val[2] and add the $val[4]

By the way, PLEASE change your wordpress setup so that when you post code, it doesn&#039;t kill the indents and transform all the single and double quotation marks! I&#039;d be more explicit with my suggestions above but if I wrote the actual code I&#039;m sure it would get mangled :)

Peace,
Nathan</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thanks for sharing your function! It definitely saved me some time.</p>
<p>You&#8217;ve got a few bugs that I came across:</p>
<p>- your regex assumes that there won&#8217;t be any tags within a heading, so having a &#8220;strong&#8221; tag around a word in your heading, for instance, causes the heading to be missed by the regex</p>
<p>- when you start your nested list, you end up with an extra li. The nested ul should be within the li tag of its &#8220;parent&#8221;. If you style your li with bullets you&#8217;ll see what I&#8217;m talking about.</p>
<p>- the $Sections array isn&#8217;t being constructed quite right. do a print_r on it and you&#8217;ll see what I mean&#8230; you just need to remove the $val[2] and add the $val[4]</p>
<p>By the way, PLEASE change your wordpress setup so that when you post code, it doesn&#8217;t kill the indents and transform all the single and double quotation marks! I&#8217;d be more explicit with my suggestions above but if I wrote the actual code I&#8217;m sure it would get mangled <img src='http://www.webdesignlessons.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Peace,<br />
Nathan</p>
]]></content:encoded>
	</item>
</channel>
</rss>

