function _putimages() {
$filter = ($this->compress) ? '/Filter /FlateDecode ' : '';
reset($this->images);
- while (list($file, $info) = each($this->images)) {
+ foreach ($this->images as $file => $info) {
$this->_newobj();
$this->images[$file]['n'] = $this->n;
$this->_out('<</Type /XObject');
$k = $this->k;
$this->javascript .= sprintf("f".$name."=this.addField('%s','%s',%d,[%.2f,%.2f,%.2f,%.2f]);", $name, $type, $this->PageNo()-1, $x*$k, ($this->h-$y)*$k+1, ($x+$w)*$k, ($this->h-$y-$h)*$k+1)."\n";
$this->javascript .= "f".$name.".textSize=".$this->FontSizePt.";\n";
- while (list($key, $val) = each($prop)) {
+ foreach ($prop as $key => $val) {
if (strcmp(substr($key,-5),"Color") == 0) {
$val = $this->_JScolor($val);
} else {
// get attributes
preg_match_all('/([^=\s]*)=["\']?([^"\']*)["\']?/', $element, $attr_array, PREG_PATTERN_ORDER);
$dom[$key]['attribute'] = array(); // reset attribute array
- while (list($id, $name) = each($attr_array[1])) {
+ foreach ($attr_array[1] as $id => $name) {
$dom[$key]['attribute'][strtolower($name)] = $attr_array[2][$id];
}
// split style attributes
// get style attributes
preg_match_all('/([^:\s]*):([^;]*)/', $dom[$key]['attribute']['style'], $style_array, PREG_PATTERN_ORDER);
$dom[$key]['style'] = array(); // reset style attribute array
- while (list($id, $name) = each($style_array[1])) {
+ foreach ($style_array[1] as $id => $name) {
$dom[$key]['style'][strtolower($name)] = trim($style_array[2][$id]);
}
// --- get some style attributes ---