News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPBuilder.com:
PHP Arrays Advanced Iteration and Manipulation
December 09, 2011 @ 12:50:11

In this new tutorial from PHPBuilder.com, Jason Gilmore shows you some of the more advanced things you can do with arrays in PHP (specifically in the areas of iterating through them and manipulating their contents).

Sporting more than 70 native array-related functions, PHP's array manipulation capabilities have long been one of the language's most attractive features. [...] There are however many array-related tasks which ask a bit more of the developer than merely knowing what part of the manual one needs to consult. Many such tasks require a somewhat more in-depth understanding of the native features, or are possible only when a bit of imagination is applied to the problem.

In his examples he shows how to do things like sorting a multi-dimensional array, iterating recursively (with the help of a RecursiveArrayIterator), converting an object to an array and doing "natural" sorting on an array's contents.

0 comments voice your opinion now!
array manipulation advanced iteration spl recursive sort


blog comments powered by Disqus

Similar Posts

PHPMaster.com: Data Structures for PHP Devs: Heaps

Brian Moon's Blog: Stupid PHP Tricks: Normalizing SimpleXML Data

Matthew Weir O'Phinney's Blog: Zend_Form Advanced Features

Paul Jones' Blog: New PDO Behavior In PHP 5.2.1

Matthew Weir O'Phinney's Blog: Automating PHPUnit2 with SPL


Community Events





Don't see your event here?
Let us know!


code laravel community configure threedevsandamaybe bugfix application introduction api language library wordpress list developer podcast series interview project release framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework