Re: newbie help please

From: Date: Mon, 03 Jun 2002 09:32:39 +0000
Subject: Re: newbie help please
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-100380@lists.php.net to get a copy of this message
"Christopher J. Crane" <ccrane@inxdesign.com> wrote in message news:20020602235956.97409.qmail@pb1.pair.com... > $Tags['issue-name']. So I could print it out. Something like, print > "$Tags['issue-name']<br>\n"; > > I was able to get a numerical representation of the array like, $Tags[5] and > the value of that tag was "RED HAT", but then I would have to know what the > position of the data I am looking for in the array. I would prefer to know > the tag name and the array and get to the data that way. I know there is a > way to do this, but I just can't figure it out. There is a lot of > information on Parsing the XML file but not getting into a useful array, or > at least that I have found easily to understand. Try this: foreach ($Tags as $key => $value) { ... } In that loop you will get all entries of $Tags[] one at a time, and $key will be the name of the entry you seek (like 'issue-name'), and $value will be the value held at that entry. -- -------------------------------------------- _ _ o o Jason Teagle < jason@teagster.co.uk v --------------------------------------------

« previous php.general (#100380) next »