Yo, Sebastian: On Tue, May 14, 2002 at 07:26:30PM +0200, Sebastian A. wrote: > > function startElement($parser, $name, $attrs='') { > global $tag, $Data, $p; > array_push( $tag, $name ); > while ( list($Key,$Val) = each($attrs) ) { > $p->attr_data["$name:$Key"] = trim($Val); > } > }
[cut and pasted from earlier email... --dc] > > function elementContent($parser, $data, $attrs='') { > > global $tag, $p; > > > > $ti = sizeof( $tag ) - 1; > > > > if ( $tag[$ti] == 'LIST_ITEM' ) { > > $p->ART_ID[] = $data; > > } > > } > function endElement($parser, $name) { > global $tag; > } > And I just wanted to mention that a lot of that code is from your tutorial Not really. You're doing everything differently. It's a lot less efficient. More importantly, it's not working. For instance... What's the point of doing the if == 'LIST_ITEM' check in the character handler rather than the end handler? What's the point of the array push when the data available therefrom is already available in the $name variable? --Dan PS: Please be polite. Don't top post and only include immediately relevant portions from prior emails. -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php