<?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: Tutorial &#8211; How to use arrays in php</title>
	<atom:link href="http://www.colinjensen.co.uk/blog/web-related/php/tutorial-how-to-use-arrays-in-php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.colinjensen.co.uk/blog/web-related/php/tutorial-how-to-use-arrays-in-php</link>
	<description>Technology, Gadgets, Website Design and Development, Windows Mobile.</description>
	<lastBuildDate>Thu, 11 Mar 2010 17:04:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Colin Jensen</title>
		<link>http://www.colinjensen.co.uk/blog/web-related/php/tutorial-how-to-use-arrays-in-php/comment-page-1#comment-2281</link>
		<dc:creator>Colin Jensen</dc:creator>
		<pubDate>Wed, 11 Mar 2009 17:27:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.colinjensen.co.uk/blog/?p=19#comment-2281</guid>
		<description>Hello Roger,

Thank you for leaving a comment.

$h = mysql_query(&quot;SELECT * FROM `names`&quot;);

if(mysql_num_rows($h)) { // Check we have results
   while($row = mysql_fetch_assoc($h)) { // Start a loop through them all
     $myarray[$row[&#039;ID&#039;]][&#039;name&#039;] = $row[&#039;name&#039;]; 
     $myarray[$row[&#039;ID&#039;]][&#039;age&#039;] = $row[&#039;age&#039;];

   }
}


I hope this helps you Roger, let me know :)</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Hello Roger,</p>
<p>Thank you for leaving a comment.</p>
<p>$h = mysql_query(&#8221;SELECT * FROM `names`&#8221;);</p>
<p>if(mysql_num_rows($h)) { // Check we have results<br />
   while($row = mysql_fetch_assoc($h)) { // Start a loop through them all<br />
     $myarray[$row['ID']]['name'] = $row['name'];<br />
     $myarray[$row['ID']]['age'] = $row['age'];</p>
<p>   }<br />
}</p>
<p>I hope this helps you Roger, let me know <img src='http://www.colinjensen.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: roger</title>
		<link>http://www.colinjensen.co.uk/blog/web-related/php/tutorial-how-to-use-arrays-in-php/comment-page-1#comment-2280</link>
		<dc:creator>roger</dc:creator>
		<pubDate>Wed, 11 Mar 2009 12:46:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.colinjensen.co.uk/blog/?p=19#comment-2280</guid>
		<description>I need a tutorial on how to load a query result into an 2 dimensional associative array.  For example the result set contains:
Name         Sales Goal      Sales
John Smith    $100000        $120000
Richard Roe   $100000        $95000
Donna Doe     $120000        $210000
Patty Poe     $80000         $65000

The array is [0][Name],[0][Sales Goal],[0][Sales] 
Where:
[0][Name]=John Smith
[0][Sales Goal]=$100000
[0][Sales]=$120000
[1][Name]=Richard Roe 
etc...</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->I need a tutorial on how to load a query result into an 2 dimensional associative array.  For example the result set contains:<br />
Name         Sales Goal      Sales<br />
John Smith    $100000        $120000<br />
Richard Roe   $100000        $95000<br />
Donna Doe     $120000        $210000<br />
Patty Poe     $80000         $65000</p>
<p>The array is [0][Name],[0][Sales Goal],[0][Sales]<br />
Where:<br />
[0][Name]=John Smith<br />
[0][Sales Goal]=$100000<br />
[0][Sales]=$120000<br />
[1][Name]=Richard Roe<br />
etc&#8230;<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
</channel>
</rss>
