File: /examples/techniques.php

Description

This file shows five different ways to iterate through the contents of a QueryPath.

QueryPath wraps zero or more elements (or, more generally, just objects). Most of the operations available in QueryPath will operate on the entire set of objects. Sometimes, though, it is desirable to go through the results one at a time. These examples exhibit five ways of accomplishing this.

Keep in mind that PHP passes objects (more or less) by reference, which means that a change to an item inside of a loop will be reflected in the main QueryPath. In other words, there is no need to put data back into the QueryPath if it is altered during a loop.

Classes defined in this file

CLASS NAME

DESCRIPTION

Include/Require Statements

'../src/QueryPath/QueryPath.php' (line 22)

require : '../src/QueryPath/QueryPath.php'

Global Variables

Constants

Functions

callbackFunction (line 46)

void callbackFunction( $index, $element)

Parameters

  • $index:
  • $element:

Info


Documentation generated on Sun, 25 Jul 2010 16:09:12 -0500 by phpDocumentor 1.4.3