Re: ergi

From: Date: Wed, 15 Nov 2000 17:54:05 +0000
Subject: Re: ergi
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-25478@lists.php.net to get a copy of this message
Ignacio Vazquez-Abrams wrote:
On Wed, 15 Nov 2000, callen wrote:
Hola: I am trying to parse the following xml: <OriginZip country="US">54022</OriginZip> with this code: if ( eregi ( "(<OrginZip country=\"US\">)([0-9]{5})(/OriginZip>)", $results, $regs)) Something doesnt jive and $regs[i] is always empty...???? Any help appreciated!
Just off the top of my head, I'd say your missing the < at the beginning of the closing tag.
And a typo in the opening tag. Also, you do know that $regs[i] probably needs to be referred to as $regs[$i], unless you want to refer to the matches directly ($regs[1], $regs[2], $regs[3]), right? -Brian

« previous php.general (#25478) next »