Sunday, May 12, 2002, 6:39:31 PM, Sebastian A. wrote:
> Hello
>  I have recently been trying to parse an XML document that has different
> content in the same tags. Here is an example:

> ...

> I am trying to get the content from <LIST_ITEM> into an array. I want the
> content of the first <LIST_ITEM> to go into $p->ART_ID[0] and the next to go
> into $p->ART_ID[1] and so on. Here is what my Element Content Function looks
> like:

Without the rest of the code I would suspect this to work:

function elementContent($parser, $data, $attrs='') {
        global $tag, $p;

        $ti = sizeof( $tag ) - 1;

        if ( $tag[$ti] == 'LIST_ITEM' ) {
                $p->ART_ID[] = $data;

Basically when you are assigning content to a new part of the array you
don't use .= but just =

:: "A program is a spell cast over a computer, turning input
    into error messages."
:: Drupal (

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to