<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PHP Interview Questions and answers&#187; sort archives  &#8211; interview questions and answers</title>
	<atom:link href="http://www.phpinterviewquestions.com/tag/sort/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpinterviewquestions.com</link>
	<description>Prepare for your next php based interview with high confidence</description>
	<lastBuildDate>Mon, 26 Sep 2011 08:37:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>sorting arrays</title>
		<link>http://www.phpinterviewquestions.com/php-interview-questions/sorting-arrays-2/</link>
		<comments>http://www.phpinterviewquestions.com/php-interview-questions/sorting-arrays-2/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 00:54:39 +0000</pubDate>
		<dc:creator>Bart</dc:creator>
				<category><![CDATA[Advanced level]]></category>
		<category><![CDATA[PHP Questions]]></category>
		<category><![CDATA[arrays]]></category>
		<category><![CDATA[sort]]></category>

		<guid isPermaLink="false">http://www.phpinterviewquestions.com/?p=91</guid>
		<description><![CDATA[Both sort() and asort() is used to sort values in ascending order.To sort them in descending order what are the functions that we can use?
rsort() &#8211; Where it resets key associations as well.
arsort() &#8211; Where it sorts in descending order, while keeping the key associations as well.




]]></description>
			<content:encoded><![CDATA[<p>Both sort() and asort() is used to sort values in ascending order.To sort them in descending order what are the functions that we can use?</p>
<p>rsort() &#8211; Where it resets key associations as well.<br />
arsort() &#8211; Where it sorts in descending order, while keeping the key associations as well.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-8695027799979044";
/* 468x15, created 4/16/10 */
google_ad_slot = "1994287074";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpinterviewquestions.com/php-interview-questions/sorting-arrays-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Array sorting</title>
		<link>http://www.phpinterviewquestions.com/php-interview-questions/array-sorting/</link>
		<comments>http://www.phpinterviewquestions.com/php-interview-questions/array-sorting/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 00:44:51 +0000</pubDate>
		<dc:creator>Bart</dc:creator>
				<category><![CDATA[Advanced level]]></category>
		<category><![CDATA[PHP Questions]]></category>
		<category><![CDATA[arrays]]></category>
		<category><![CDATA[sort]]></category>

		<guid isPermaLink="false">http://www.phpinterviewquestions.com/?p=87</guid>
		<description><![CDATA[What is the difference between sort() and asort()?
The main difference is that sort() will sort an array without concerning it&#8217;s key associations while asort() will maintain it&#8217;s key association as well.




]]></description>
			<content:encoded><![CDATA[<p>What is the difference between sort() and asort()?</p>
<p>The main difference is that sort() will sort an array without concerning it&#8217;s key associations while asort() will maintain it&#8217;s key association as well.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-8695027799979044";
/* 468x15, created 4/16/10 */
google_ad_slot = "1994287074";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpinterviewquestions.com/php-interview-questions/array-sorting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sorting arrays</title>
		<link>http://www.phpinterviewquestions.com/php-interview-questions/sorting-arrays/</link>
		<comments>http://www.phpinterviewquestions.com/php-interview-questions/sorting-arrays/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 00:38:23 +0000</pubDate>
		<dc:creator>Bart</dc:creator>
				<category><![CDATA[Advanced level]]></category>
		<category><![CDATA[PHP Questions]]></category>
		<category><![CDATA[arrays]]></category>
		<category><![CDATA[sort]]></category>

		<guid isPermaLink="false">http://www.phpinterviewquestions.com/?p=85</guid>
		<description><![CDATA[What is the best way to sort an array by maintaining it&#8217;s key associations as well?
$array = array(&#8216;a&#8217;=>&#8217;foo&#8217;,'b&#8217;=>&#8217;bar&#8217;,'c&#8217;=>&#8217;baz&#8217;);
asort($array);
print_r($array);
Array
(
    [b] => bar
     => baz
    [a] => foo
)




]]></description>
			<content:encoded><![CDATA[<p>What is the best way to sort an array by maintaining it&#8217;s key associations as well?</p>
<p>$array = array(&#8216;a&#8217;=>&#8217;foo&#8217;,'b&#8217;=>&#8217;bar&#8217;,'c&#8217;=>&#8217;baz&#8217;);<br />
asort($array);<br />
print_r($array);</p>
<p>Array<br />
(<br />
    [b] => bar<br />
     => baz<br />
    [a] => foo<br />
)</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-8695027799979044";
/* 468x15, created 4/16/10 */
google_ad_slot = "1994287074";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpinterviewquestions.com/php-interview-questions/sorting-arrays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

