shingionline
New Member
Hi Guys,
I have an array
When i run this function
I get the output below:-
--------------------------------
---------------------------------
My question is, how can i print only certain parts of the data rather than printing the whole array. For example i only want to echo the values for [NAME], [USERNAME], [PASSWORD] and [NEXTDUEDATE] from the [PRODUCT] part of the array
Thanks in advance
I have an array
Code:
$arr
When i run this function
Code:
print_r($arr)
I get the output below:-
--------------------------------
Code:
Array
(
[WHMCSAPI] => Array
(
[ACTION] => getclientsproducts
[RESULT] => success
[CLIENTID] => 87
[PID] => 13
[DOMAIN] => dfgbhcgnd.com
[TOTALRESULTS] => 1
[STARTNUMBER] => 0
[NUMRETURNED] => 1
[PRODUCTS] => Array
(
[PRODUCT] => Array
(
[ID] => 196
[CLIENTID] => 87
[ORDERID] => 218
[PID] => 13
[REGDATE] => 2011-12-07
[NAME] => Walderizer
[DOMAIN] => dfgbhcgnd.com
[DEDICATEDIP] =>
[SERVERID] => 3
[FIRSTPAYMENTAMOUNT] => 55.00
[RECURRINGAMOUNT] => 55.00
[PAYMENTMETHOD] => banktransfer
[PAYMENTMETHODNAME] => Bank Transfer
[BILLINGCYCLE] => Monthly
[NEXTDUEDATE] => 2011-12-07
[STATUS] => Active
[USERNAME] => vitaforiz
[PASSWORD] => ghTfg476fg
[SUBSCRIPTIONID] =>
[LASTUPDATE] => 0000-00-00 00:00:00
[CUSTOMFIELDS] => Array
(
[CUSTOMFIELD] => Array
(
[NAME] => IP Address
[VALUE] =>
)
)
[CONFIGOPTIONS] =>
)
)
)
)
---------------------------------
My question is, how can i print only certain parts of the data rather than printing the whole array. For example i only want to echo the values for [NAME], [USERNAME], [PASSWORD] and [NEXTDUEDATE] from the [PRODUCT] part of the array
Thanks in advance
Last edited: