Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP XML

Status
Not open for further replies.

MJAZ

Programmer
Aug 1, 2006
73
US
Hello! I am wondering about doing certain things with the PHP XML functions.

First, I would like to learn how to get the value of an attribute and do something if the attribute equals something. Like this:

Code:
<?xml stuff>
<mail status="unread/read">
 <subject>Hello!</subject>
 <from>foobar</from>
 <message>Blah Blah Blah</message>
</mail>

The script then checks for the <mail> tag, then if the attribute equals "read" goes on to the next one, or if it equals "unread" adds one to the unread mail list. Then, when the message is viewed, it changes the status attribute to "read".

I have absolutely no idea how to do this, so any help would be appreciated.

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top