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

DevShed:
Iterators in the Simplest Sense - Traversing Data Structures in PHP 5
Mar 23, 2006 @ 13:26:35

Wrapping up their series on Iterators in PHP, DevShed has posted Traversing Data Structures in PHP 5 - a look a combining embedded classes with the SPL to work through your data.

Welcome to the final part of the series "Iterators in the Simplest Sense." In this set of articles, you'll learn the basic concepts of iterators in PHP 4 and PHP 5. The overall learning experience is strongly focused on the practical sense of the topic, so you can start quickly using iterators within your own PHP applications.

In this last article I'll explore the implementation of PHP 5 iterators, by utilizing some of the embedded classes that integrate the powerful SPL package. Thus you can learn quickly how to include these programming structures inside your PHP applications.

They jump right in and start working with the SPL functions to create a simple, readable iterator class ("FileIterator"). They follow this with two examples building on the class - one that works with data from a text file, and the other from a MySQL database.

tagged: iterator traversing data structures php5 fileiterator iterator traversing data structures php5 fileiterator

Link:

DevShed:
Iterators in the Simplest Sense - Traversing Data Structures in PHP 5
Mar 23, 2006 @ 13:26:35

Wrapping up their series on Iterators in PHP, DevShed has posted Traversing Data Structures in PHP 5 - a look a combining embedded classes with the SPL to work through your data.

Welcome to the final part of the series "Iterators in the Simplest Sense." In this set of articles, you'll learn the basic concepts of iterators in PHP 4 and PHP 5. The overall learning experience is strongly focused on the practical sense of the topic, so you can start quickly using iterators within your own PHP applications.

In this last article I'll explore the implementation of PHP 5 iterators, by utilizing some of the embedded classes that integrate the powerful SPL package. Thus you can learn quickly how to include these programming structures inside your PHP applications.

They jump right in and start working with the SPL functions to create a simple, readable iterator class ("FileIterator"). They follow this with two examples building on the class - one that works with data from a text file, and the other from a MySQL database.

tagged: iterator traversing data structures php5 fileiterator iterator traversing data structures php5 fileiterator

Link:

DevShed:
Iterators in the Simplest Sense - Traversing Different Data Structures
Mar 15, 2006 @ 18:50:40

DevShed has posted the second part in their "Iterators in the Simplest Sense" series - this time focusing on traversing different data structures.

Welcome to the second tutorial of the series "Iterators in the simplest sense." Just in case you didn't know, this series introduces Iterators in PHP 4 – PHP 5, explaining their basic concepts, and teaches you how to use them in practical projects, which can be utilized as part of larger PHP applications.

By the end of this tutorial, I hope you'll have an accurate idea of how to use a generic Iterator structure. I will show how it is useful for traversing different data structures by providing specific implementations for each of the abstract methods defined within the base Iterator class.

They look first at extending the code that they had before by making an interator to work with a MySQL connection. They discuss how it will all work prior to coding (plan first, code later) before moving into the actual coding process and creating the class. The iterator, once extended, provides an interface between you and the normal MySQL functions, making it easier to handle the results from your queries (with things like "countAffectedRows" and "seekRow").

tagged: iterators data structures files mysql iterators data structures files mysql

Link:

DevShed:
Iterators in the Simplest Sense - Traversing Different Data Structures
Mar 15, 2006 @ 18:50:40

DevShed has posted the second part in their "Iterators in the Simplest Sense" series - this time focusing on traversing different data structures.

Welcome to the second tutorial of the series "Iterators in the simplest sense." Just in case you didn't know, this series introduces Iterators in PHP 4 – PHP 5, explaining their basic concepts, and teaches you how to use them in practical projects, which can be utilized as part of larger PHP applications.

By the end of this tutorial, I hope you'll have an accurate idea of how to use a generic Iterator structure. I will show how it is useful for traversing different data structures by providing specific implementations for each of the abstract methods defined within the base Iterator class.

They look first at extending the code that they had before by making an interator to work with a MySQL connection. They discuss how it will all work prior to coding (plan first, code later) before moving into the actual coding process and creating the class. The iterator, once extended, provides an interface between you and the normal MySQL functions, making it easier to handle the results from your queries (with things like "countAffectedRows" and "seekRow").

tagged: iterators data structures files mysql iterators data structures files mysql

Link:


Trending Topics: