Hi all,
I'm trying to connect to an API right now and I'm wondering how you call a specific pocket from an array which is located in an XML file. My terminology may be wrong, but allow me to show you some of the code that I've got.
PHP Code:
<?php
echo base::CallAPI ('AccountInfo');
?>
This will show me the following
email$amountUSD2009-10-24 09:32:01
Basically, it is taking my account name, the amount of money I have, currency, date/time and putting it altogether in a not so neat way.
When I put in the code
PHP Code:
<pre><?php
print_r(base::ParseXML(base::CallAPI('AccountInfo')));
?></pre>
It shows the following..
Array
(
[Email] => my email
[Credits] => amount of money I have in my account
[Currency] => USD
[Server.Time] => 2009-10-24 09:32:01
)
What I would like to do is to call just the e-mail and credits part and take out the currency as well as server.time. So ideally, I'd like it to look like this...
E-mail: _________
Credits: _____________
As I'm sure many of you can tell, I'm very new to php, but any help would be fantastic!
Bookmarks