I am seeking your help! I want to show the names of Player 2 and Player 3 whose disconnect_time is empty (because they're still in-game) and NOT show Player 1 because he's no longer in-game.
How would I go on about doing that?
I know about pulling out one name through
$xml->players->player->name;
but I don't know how to do it with multiple players
- and with an if statement like disconnect_time empty == show
<server>
<players>
<player>
<name>Player 1</name>
<connect_time>2014-03-13 09:27</connect_time>
<disconnect_time>2014-03-13 09:36</disconnect_time>
</player>
<player>
<name>Player 2</name>
<connect_time>2014-03-13 11:37</connect_time>
<disconnect_time/>
</player>
<player>
<name>Player 3</name>
<connect_time>2014-03-13 11:45</connect_time>
<disconnect_time/>
</player>
</players>
</server>
Thank you so much in advance for any help!