Jump to content

PHP_Arrays_XML... I guess.


Aryan Duntley

Recommended Posts

Hello, I am gathering data from basecamp.  I am not using the API's because i simply could not figure out how to work them.  I attempted the sample files that were associated with the various api's but could not get them working.  So I have some simple php code with curl elements to access the data.  The data I receive is space separated elements.  I am using http://keithdevens.com/software/phpxml#source This guy's code to generate array elements.  I guess this PHP's way of outputting XML, but I am having a hard time of figuring out what the heck is going on with it all.  The format is shown below and repeats for the rest of the data (obviously the elements or values differ for the individual tags or array elements).  I would appreciate any assistance or ideas on how to access the various elements individually, or to at least have this out put in a more readable manner.  There should be five categories (date, description, id, person-id, and project-id; but a sixth category/element is seen here -- todo-item-id).  Here is the format with the first two complete sets (warning: it's lengthy...):

 

Array ( [time-entries attr] => Array ( [type] => array ) [time-entries] => Array ( [time-entry] => Array ( [0] => Array ( [date attr] => Array ( [type] => date ) [date] => 2011-07-21 [description] => Installing XiPay component diecommi.mvc to the correct place, ad-hoc testing. [hours attr] => Array ( [type] => float ) [hours] => 1.25 [id attr] => Array ( [type] => integer ) [id] => 41720538 [person-id attr] => Array ( [type] => integer ) [person-id] => 7605777 [project-id attr] => Array ( [type] => integer ) [project-id] => 6386298 [todo-item-id attr] => Array ( [type] => integer [nil] => true ) [todo-item-id] => ) [1] => Array ( [date attr] => Array ( [type] => date ) [date] => 2011-07-20 [description] => negative auth deployed to dev.zeemedical.com [mostly] [hours attr] => Array ( [type] => float ) [hours] => 7.5 [id attr] => Array ( [type] => integer ) [id] => 41720423 [person-id attr] => Array ( [type] => integer ) [person-id] => 7605777 [project-id attr] => Array ( [type] => integer ) [project-id] => 6386298 [todo-item-id attr] => Array ( [type] => integer [nil] => true ) [todo-item-id] => ) [2] => Array ( [date attr] =>

Link to comment
https://forums.phpfreaks.com/topic/242650-php_arrays_xml-i-guess/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.