RSS DAILY NEWS TICKER EXAMPLE


home > overview

Builder.com.au: How do I...recursively scan directories with PHP's DirectoryIterators?




Builder.com.au has a new tutorial posted today talking about the use if Iterators (from PHP's SPL) to recurse down through directories on your local drive.

One of PHP5's most interesting new features is the addition of Iterators, a collection of ready-made interfaces designed to help in navigating and processing hierarchical data structures. These Iterators significantly reduce the amount of code required to process an XML document tree or a file collection.

They give three examples - two basic ones showing a simple use of the DirectoryIterator and RecursiveDirectoryIterator and another slightly more complex one showing how to get information from the recursive iteration as it goes down.




click here to see original article or to find similar articles

 RSS DAILY HEADLINES

HEADLINES

Newsweek: McCains $5 million gaffeThe same media machine that rewards consultant-driven candidates for staying on-message is apt to ignore a dozen well-crafted talking points in favor of a single slip of the candidate's tongue. And McCain--whose performance as a whole was solid--had just such a slip Saturday night.

Court: Accused Nazi eligible for extradition (AP) AP - An 86-year-old man accused of killing a Jewish teenager in Hungary during World War II can be extradited to Hungary to face charges, an Australian judge found Wednesday.

U.S. tracking citizens border crossings: report (Reuters)

A U.S Customs Officer checks the identification papers of a driver entering the U.S. from Canada at the Detroit-Windsor tunnel in Detroit, January 31, 2008. (Rebecca Cook/Reuters)Reuters - The U.S. government has been using its border checkpoints to collect information on citizens that will be stored for 15 years, raising concern among privacy advocates, the Washington Post reported on Wednesday.



Find this article in Google