blob: b0612488c028b59d8bb6835a29ec6968de7cf496 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<?php
/**
* Really simple RecordSet to allow printTable of arrays.
*
* $Id: ArrayRecordSet.php,v 1.3 2007/01/10 01:46:28 soranzo Exp $
*/
class ArrayRecordSet {
var $_array;
var $_count;
var $EOF = false;
var $fields;
function __construct($data) {
$this->_array = $data;
$this->_count = count($this->_array);
$this->fields = reset($this->_array);
if ($this->fields === false) $this->EOF = true;
}
function recordCount() {
return $this->_count;
}
function moveNext() {
$this->fields = next($this->_array);
if ($this->fields === false) $this->EOF = true;
}
}
?>
|