Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About lemaster777

  • Rank
  1. Uhg.. Ok, learning more as I go. If I just switch the $y=$b2 - $a2; around to $y = $a2 - $b2; then it works. I can not thank you enough for helping me muddle through this. Not having access to the original authors source code for webservice api and other portions of this site, combined with my lack of php knowledge is making this a great adventure. Thanks again.
  2. Ok, here is where I stand, and I think I am over the initial roadblock. 1. I have the simplexml into an array. This is working. $sortable = array(); foreach ($table as $case) { $sortable[]=$case; } usort($sortable, function($a, b$) { //I DID THIS TO TEST. The sort was not seeing the $a, $b as a string //so I did the following $test1 = (string)$a->DOCKETID; // This got me just the element we want to sort on $test2 = (string)$b->DOCKETID; // This got me just the element we want to sort on list($a1, $a2, $a3) = splitParts($test1); // Calling the function you provided below
  3. If I just call the webservice that is supposed to generate the XML, attached is the XML RAW results, but not from the functions I presented. GetDailyListingSummary.xml
  4. I know this is a pain, but I did the following: $result->GetDailyListingSummaryResult->any and I did a var_dump($result) Here it is attached, just a long string.... VarDumpResult.txt
  5. This is what the API they have is returning. It returns object from simplexml. That's all I can give you, below is the function that generates this: function GetDailyListingSummary($filterdate) { //ini_set('soap.wsdl_cache_enable', '0'); $x = new SoapClient(variable_get('prcwebservice'),variable_get('soapauth')); // make an API call and get data $result = $x->GetDailyListingSummary(array('docDate'=>$filterdate)); // Interpret the XML response $apiresult = simplexml_load_string($result->GetDailyListingSummaryResult->any); $dockets = $apiresult->Daily
  6. Ok, first---- Thanks for all the help. Second, I have the following: I get the data into an array and then apply your function. I must need to sort or pass in one of the array columns. I do not get an error, but I also do not get the result. $table should contain the data from XML. I then put it into an Array and apply the function: foreach($table as $case) { $sortable[] = $case; } var_dump($sortable); 'I HAVE ATTACHED THE RESULTS TO THIS usort($sortable,function($a,$b) { list($a1, $a2, $a3) = splitParts($a); list($b1, $b2, $b3) = splitParts($b); $x = strcmp($a1, $b1);
  7. The file I posted earlier is all I have, the simple_xml is coming from someone else's compiled call to a database. Longer sigh...
  8. My issue is with getting xml into an array now..
  9. http://php.net/manual/en/book.simplexml.php
  10. I'm with you on that... I'm thinking it can somehow be loaded into a regular array, sorted and then used as normal.
  11. Ok, this all worked in the area I needed. Thank you endlessly for that. Now I have another section of code, that does not seem to work. It is the same principle but the code runs elsewhere. When I place your function in the code, it fails. This is must be inline php issue or something. Attached is the var_dump and var_export of the data. It must be something different, as I can not seem to get the code to work on this data set. Array-Sample2-varExport.txt Array-Sample2-varDump.txt
  12. I just had wrong code in wrong place.
  13. Ok, as I said, I am new to PHP. I had to move the function you provided out of the function I placed it in. Working now. Let me look at results in a few places and confirm.
  14. Attached is the full set of code. Must be something wrong is the syntax on my end. Fill-ID.txt
  • 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.