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:
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
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