<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Fri, 24 May 2013 19:51:51 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[ProDevTips: Sorting 2D-arrays in PHP - anectodes and reflections]]></title>
      <guid>http://www.phpdeveloper.org/news/9363</guid>
      <link>http://www.phpdeveloper.org/news/9363</link>
      <description><![CDATA[<p>
On the ProDevTips website today, there's <a href="http://www.prodevtips.com/2008/01/06/sorting-2d-arrays-in-php-anectodes-and-reflections/">a new article</a> looking at the sorting of arrays, specifically of the two- and three-dimensional sort. 
</p>
<blockquote>
One of the many problems with PHP that detractors are eager to point out is the fact that the language has thousands of global functions. Without the awesome CHM version of the PHP manual - finding your way in this jungle would be a mess. Simply finding a function like array_multisort is not trivial. And even if you find it, understanding it completely is not trivial either!
</blockquote>
<p>
Not quite finding what he needed in the <a href="http://www.php.net/array_multisort">array_multisort</a> function built into PHP, the author opts to create his own custom sorting function that make sorting 2D arrays simpler.
</p>]]></description>
      <pubDate>Mon, 07 Jan 2008 08:41:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[LivePipe Blog: Complex Sorting with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/8138</guid>
      <link>http://www.phpdeveloper.org/news/8138</link>
      <description><![CDATA[<p>
On the LivePipe blog today, there's a <a href="http://livepipe.net/blog/programming/complex_sorting">quick new article</a> demonstrating a sorting method that can be used for more than just simple datasources:
</p>
<blockquote>
Most often when I need to sort complex data sets, I'm using some sort of SQL backend. Today I needed to do complex sorting of Reflection objects for some auto generating documentation I'm working on for the upcoming Picora release. [...] In the usort() examples, I had always been under the assumption that the return values had to be 0, 1 or -1. Today I learned that is not true at all, and you can come up with your own scoring system with any range, negative or positive.
</blockquote>
<p>
He illustrates the point with <a href="http://livepipe.net/blog/programming/complex_sorting">a simple example</a> showing the sorting of the documentation for Picora. In his protected function, scoreFromMethod, he defines the return array with several values instead of just the one.
</p>]]></description>
      <pubDate>Thu, 28 Jun 2007 07:11:21 -0500</pubDate>
    </item>
  </channel>
</rss>
