Jump to content

shingionline

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Everything posted by shingionline

  1. The fact that you have a project to work on is a great start. I would highly recommend you have a look into the Codeigniter PHP framework it has been the best decision i ever made in my quest to learn PHP. Codeigniter has a very extensive user guide within no time you'll get the hang of it. All the best
  2. Got it! Thank you very much guys, everything is working perfectly
  3. Thanks for your help, yes this is coming from XML. The simple solution will be fine, there will only ever be 1 PRODUCT. The code below is fine for first level values echo $arr['WHMCSAPI']['DOMAIN']; but when i try to get [uSERNAME] with echo $arr['WHMCSAPI']['PRODUCT']['USERNAME']; i get the error "Undefined index: PRODUCT"
  4. Thanks, this works well for the first level eg: echo $arr['WHMCSAPI']['DOMAIN']; How can i get to the [uSERNAME] which is on the second level. The code below echo $arr['WHMCSAPI']['PRODUCT']['USERNAME']; gives the error message "Undefined index: PRODUCT"
  5. Hi Guys, I have an array $arr When i run this function print_r($arr) I get the output below:- -------------------------------- 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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.