<?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: Flattening Multidimensional Arrays</title>
	<atom:link href="http://scriptionary.com/2008/10/11/flattening-multidimensional-arrays/feed/" rel="self" type="application/rss+xml" />
	<link>http://scriptionary.com/2008/10/11/flattening-multidimensional-arrays/</link>
	<description>A Blog on Programming and Technology</description>
	<lastBuildDate>Fri, 18 May 2012 20:22:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: fixitman</title>
		<link>http://scriptionary.com/2008/10/11/flattening-multidimensional-arrays/comment-page-1/#comment-1452</link>
		<dc:creator>fixitman</dc:creator>
		<pubDate>Mon, 27 Oct 2008 14:29:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.scriptionary.com/?p=44#comment-1452</guid>
		<description>Actually, you should be multiplying by width, not height.  Your example works because the array is square.  however if:

width = 5, and height = 4, 
x = 2, y = 3

array[y*height+x]  would return 14 
whereas array[y*width+x] would return 17, your desired result.</description>
		<content:encoded><![CDATA[<p>Actually, you should be multiplying by width, not height.  Your example works because the array is square.  however if:</p>
<p>width = 5, and height = 4,<br />
x = 2, y = 3</p>
<p>array[y*height+x]  would return 14<br />
whereas array[y*width+x] would return 17, your desired result.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

